How to Host Wordpress in China
Tags: wordpress, china, webdev, headless
Published: 2021-03-16 04:27:07

---
canonical_url: https://www.21cloudbox.com/solutions/how-to-install-wordpress.html
---
# What is WordPress?

WordPress is developed based on PHP, a free and open source veteran blog and content management system (CMS). WordPress has a rich and complete theme and available plugins. Nearly 34% of the websites in the world are using WordPress with the main website, e-commerce website, content management system and other purposes. 

Popular examples include *Time's* official website, The official website of *The Walt Disney Company*, famous singer *Katy Perry's official website*, and so on all use WordPress.

To see how these popular site's perform in China, take a look at [this case study](https://www.21cloudbox.com/solutions/how-to-speed-up-shopify-site-in-china.html).


<br>
# How to Host Wordpress in China

This guide shows how to deploy a WordPress instance using 21YunBox in a few minutes. This deployment plan refers to the official WordPress [best practice recommendations](https://wordpress.org/about/requirements/), using the full site HTTPS support, MySQL v5.6+ Database, and PHP v7.4+ technology are deployed, so that users can achieve the best WordPress effect.

<br>
## Steps to Hosting Wordpress

1. Register as a [21YunBox member](https://www.21yunbox.com/u/signup/)
2. Create a [MySQL database](https://launch-in-china.21yunbox.com/solutions/how-to-create-a-mysql-database.html) in 21YunBox
3. Click "Hosted Applications" in the navigation menu, and then select "WordPress"

>In terms of service configuration selection, the official WordPress documentation recommends using at least 1GB of RAM and 10GB cloud disks. **If you choose a machine with fewer cloud disk space for deployment, the deployment may fail.**

4\. Click **Advanced Configuration** and add the following environment variables:

| Environment Variable Key | Environment Variable Value|
| ------------------------ | :------------------------:|
| `WORDPRESS_DB_HOST`      | MySQL host name           |
| `WORDPRESS_DB_NAME`      | MySQL database            |
| `WORDPRESS_DB_USER`      | MySQL username            |
| `WORDPRESS_DB_PASSWORD`  | MySQL user password       |


5\. Click "Create Now"

In seconds, the WordPress instance will be deployed online and you can access it through `https://<app_id>.21cloudbox.com`.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28ycudc1lg5e6mp2494g.png) *WordPress instance deployment is successful!*

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fob9jm6afyfp2aza0hn3.png) *After a simple configuration, the homepage rendering*

<br>
### Operation video
If you are not sure about the above steps, you can refer to the following operation demonstration:

[How to deploy WordPress to the server](https://www.bilibili.com/video/BV1gb4y197FL)


## Configure Custom Domain Dame

When you complete [ICP record](https://www.21yunbox.com/docs/#/beian),
You need to configure the custom domain name in the backend of 21YunBox and the dashboard of WordPress respectively, as follows:

### 1. Operation in WordPress
Find and modify "WordPress Address (URL)" and "Site Address (URL)" in the "Settings" of the dashboard to point to the custom domain name.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3gygnzgwfztxc3crx62.png) *Configure a custom domain name for WordPress*

<br>
### 2. Operation in 21YunBox
Find "Custom Domain Name" in the "Settings" of the project, add the custom domain name and connect. For more details, please refer to: [Custom Domain Name Configuration](https://www.21yunbox.com/docs/#/custom-domains).



<br>
## Configure Sending Mail Service

If you need to use WordPress to send emails, you can install the free [WPMail SMTP plug-in](https://wordpress.org/plugins/wp-mail-smtp/) and configure with the mail sending service provider, such as [Mailgun] (https://www.mailgun.com/), which will provide you a monthly quota of 10,000 emails for free.

<br>
## More WordPress plugins

You can install new plugins in the WordPress dashboard. Here are a few commonly used WordPress plugins:

- [Jetpack](https://wordpress.org/plugins/jetpack/) is used to increase security and performance.
- [Akismet Anti-Spam](https://wordpress.org/plugins/akismet/) Manage comment spam.
- [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/) Website used to optimize search engines.

<br>
# Why Choose 21YunBox?

> 21YunBox is a Cloud Service Platform based out of Beijing, China. We specialize in modern web hosting and automation solutions. This enables you to set up websites instantly.  

> **Have questions about hosting and deploying in China? Let us know, we are happy to help!** <21YunBox@gmail.com> 

To learn about the differences between 21YunBox and these foreign (outside of China) cloud service platforms, please refer to:

* [21YunBox vs Heroku](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-heroku-in-china.html)
* [21YunBox vs Netlify](https://launch-in-china.21yunbox.com/blog/solutions/alternatives-to-netlify-in-china.html)
* [21YunBox vs Vercel](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-vercel-in-china.html)
* [21YunBox vs Gatsby Cloud](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-gatsby-cloud-in-china.html)
* [21YunBox vs Github Pages](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-github-pages-in-china.html)
* [21YunBox vs Surge.sh](https://launch-in-china.21yunbox.com/solutions/how-to-speed-up-surgesh-in-china.html)
* [Compare in terms of function and price: 21YunBox vs Heroku, Netlify, Vercel](https://www.21yunbox.com/compare-others/)

<br>
*This article's content originated [here](https://21cloudbox.com/solutions/how-to-install-wordpress.html)*

*For additional detail and future modifications, refer the original post.*