The easiest way to install WordPress on a CentOS server. Using Centmin Mod, you can install WordPress, configure and secure the server, and take care of everything in a matter of minutes. We’ll show you how to do everything in this tutorial.
Before we begin, make sure have:
- A CentOS VPS/Cloud server. Check our comparison of popular cloud providers and choose the best one for you. If you can’t choose, go with Vultr. It’s the safest choice. You can get free Vultr credits here, which basically means you can get a server for free. The recommended VPS is at least 1GB RAM. Add additional swap space if possible. Note that your server must be a fresh/new server. So spin up a new server or reinstall your current one.
- An SSH client so you can log into your server. We recommend MobaXterm or PuTTy. They have tutorials on how to use them.
Ok, so now that we got that out of the way, onto our tutorial.
Our tutorial is optimized for a CentOS 7 server, but the instructions are pretty much the same for any version.
One of the most common mistakes everyone makes when installing Centmin Mod. So we have to add this as our first step.
It’s recommended to disable SELINUX temporary. You can do so by running the following command:
“Temporary” means it will be disabled until you reboot your server.
To disable SELINUX permanently:
Use your favorite text editor and open:
Find the ‘SELINUX=enforcing” line and edit it to disable:
Now reboot your server.
Update your CentOS server
Next step (and you should regularly do this) is to update your server. You can do so by running the following command:
Install Centmin Mod
We’ll use the curl method, even though there are other ways of installing Centmin Mod. Just run the following line:
curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh
After the installation is done, you should get some stats about the installation.
Now log out of the server and log back in.
Install WordPress using Centmin Mod
First, invoke the Centmin Mod menu using the following command:
And select the option 22 – just write “22” and hit enter.
You’ll be prompted to enter a domain, email, FTP details etc. which are all self-explanatory.
The option 22 from Centmin Mod will install WordPress, configure Nginx, install and configure a caching plugin (and a bunch of other plugins), and basically do everything.
After the installation is complete, you’ll get a list of things you need to do to complete the setup.
Complete the WordPress setup
All steps are pretty self-explanatory and easy to do, but we’ll share out 2 cents about some of them:
Step 6 – Be careful when optimizing or minifying code. More often than not, minifying your code will break your site. Often due to poorly-written themes. So enable the option and make sure everything is okay!
Step 11 – We personally think the GTmetrix plugin is unnecessary, but you’re free to use it.
Step 17 – Instead of using Yoast SEO, use The SEO Framework. It’s more lightweight and doesn’t have as much bloat as Yoast does.
Of course, all steps are optional (except the first 3!), so you’re free to deactivate all of the plugins and use whatever you want to.
And that’s it. You’ve successfully installed WordPress on a CentOS 7 server.
If you’re not into written tutorials, you can watch an official video tutorial by Centmin Mod:
Please visit the official Centmin Mod website and read their documentation, their forums etc. We especially recommend reading the Getting Started guide. They even have a dedicated page for installing WordPress with more details than our tutorial.
If this was too hard for you or you don’t want to be bothered doing any of this, you have two options: