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.
Prerequisites
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.
Disable SELINUX
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:
setenforce 0
“Temporary” means it will be disabled until you reboot your server.
To disable SELINUX permanently:
Use your favorite text editor and open:
nano /etc/sysconfig/selinux
Find the ‘SELINUX=enforcing” line and edit it to disable:
SELINUX=disabled
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:
yum update
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:
centmin
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
1. Enable Permalinks (DO NOT use links with .html extensions for performance reasons) i.e. /%post_id%/%postname%/ 2. Settings Menu > Super Cache > Easy tab and enable it by checking Caching On (Recommended) and hit Update Status 3. Advanced tab & check Use mod_rewrite serve cache files & Don’t cache pages with GET parameters and Known User. (Recommended), Cache rebuild for anonymous users, clear all cache when a post or page updated & hit Update Status 4. WP Security Menu > Settings > Check All except Enable Live Traffic tool and hit Update settings 5. Settings Menu > Updates Notifier and setup your notify email address and cronjob (save and test button to check) 6. Settings Mnenu > Autoptimize and check Optimize HTML, JavaScript and CSS options (show advanced settings) 7. Settings Menu > Limit Login Attempts and configure as desired or leave as defaults 8. Sucuri Security Menu and top left click Generate API key for your domain/email and configure your Settings tab 9. WP-Optimize Menu and configure as needed 10. Memory Usage Menu > Settings and adjust accordingly 11. GTmetrix Menu > setup and register your GTmetrix Account and API Key 12. go-newrelic plugin installed but not activated read https://wordpress.org/plugins/go-newrelic/installation/ 13. Tools > P3 Plugin Profiler > Start Scan to profile all your plugins 14. Plugins > Query Monitor is disabled by default, enable to check MySQL query stats 15. Plugins > DB Cache Reloaded disabled by default unsure if works with WordPress 4.x ? 16. Appearance > Theme Options (Responsive theme) > Home Page nav bar > Uncheck Overrides WordPress front page option 17. Seo Menu (Yoast SEO) > configure accordingly 18. Settings > UpdraftPlus Backups > Settings set file/database backup intervals & optional backup to remote storage 19. Analytics > Settings > configure your Google Analytics UA Code
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:
Further reading
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.
Final thoughts
If this was too hard for you or you don’t want to be bothered doing any of this, you have two options:
- Get a Managed VPS and let your hosting provider do all of this (and more) for you.
- Get support from us, and we’ll configure your server and install WordPress for you.
This post was last modified on January 5, 2019 5:02 pm
View Comments (3)
I think is not a good idea to disable SELinux permanently due you will remove a security layer instead is better to set and use correct context.
Updated the tutorial. Thanks
hello is anyone got a benchmark compare with Centminmod and SlickStack i'm trying to see if Ubuntu speed is matching or not thanks bro