How To Install Centmin Mod With WordPress | An Easy Installation Guide

This guide is a ready reckoner on how to install Centminmod auto installer script, change the mysql password, change wordpress configuration for permalinks to work, enable CSF firewall blocklists, deleting sites etc

Nginx auto installer scripts

If one is desirous of installing Nginx on the web server, the best option is to use an auto installer script.

The advantage of an auto installer script is that all the components that are necessary for the Nginx web server to work properly and in an efficient manner are automatically installed.

Also, each of the components is properly optimized and calibrated so as to ensure that there are no problems of configuration or compatibility that arise during the working of the web server.

Centmin Mod vs. Easyengine

The auto installer space is dominated by two well known scripts, namely, Centmin Mod and Easyengine.

Each has its own merits and demerits.

The salient features of the Centmin Mod script is that it works only on Centos 6 or 7. The script automatically installs Nginx, MariaDB, PHP-FPM & CSF Firewall at the click of a button.

In contrast, Easyengine works only on Ubuntu. It installs NGINX, PHP, MySQL, Postfix and dependencies in a single command.

There are some advantages and disadvantages to using Centmin Mod over Easyengine and vice versa which we shall discuss later.

How to install Centmin Mod

The installation guide given at the Centmin Mod site is very detailed and comprehensive. However, this creates a problem for casual webmasters because the information to do simple and necessary tasks is not readily available and requires to be searched on different pages.

To resolve that problem, this guide is written so that all the essential tasks towards installing Centmin Mod and getting WordPress to work are set out in one place. However, in the event of a doubt, one should refer to the official site for clarification.

Centos 7 vs. Centos 6

It is better to install Centos 7 as the operating system. It is the latest version and may be faster than Centos 6.

Install Centmin Mod

Choose between:

Centmin Mod Stable Release Install

yum -y update; curl -O && chmod 0700 && bash


Centmin Mod Latest Beta Release Install

yum -y update; curl -O && chmod 0700 && bash

The Beta version appears to be better. On a couple of occasions when I installed with the stable version, the Port 80 was blocked and the site was not accessible. This may have happened because of incompatibility between the Config Server Firewall (CSF) and FirewallD (the built-in firewall in Centos 7). The problem is avoided with the beta version.

One has to just enter either of the two commands in the SSH and press enter. This is sufficient to install Centmin mod. The entire installation process takes about 20 minutes.

Change MySql password for root

Centmin Mod installs MySQL Maria DB with a random password.

The MySQL root password is shown as soon as the install finishes.

The password can also be accessed from /root/.my.cnf

To change the root password, login to the MySQL server from the command line with the following command:

 mysql -u root -p

Enter the current password to complete the login.

Switch to the MySQL database with the following command:

 use mysql;

Change the password for the root user.

 update user set password=PASSWORD('your_new_password') where User='root';

Reload MySQL

 flush privileges;

Create sites

 cd /usr/local/src/centminmod

Choose option 2

For wordpress site with cache plugin choose option 22 (see below)

WordPress Nginx Auto Installer with WP Super Cache

The latest version of Centmin Mod offers the option to create a site with WordPress. You can also choose from one of three cache options, which includes WP Super Cache.

This option can be chosen vide option 22 in the menu.

It is recommended to always ensure your Centmin Mod installed code is up to date before running menu option 22. To update follow instructions at

Enable wordpress permalinks

 cd /usr/local/nginx/conf/conf.d
 nano name-of-domain.conf

Find the line

 #try_files    $uri $uri/ /index.php;

and remove the ‘#’ mark

Alternatively, add in the location block

 try_files $uri $uri/ /index.php?q=$uri&$args;
 service nginx restart

If you get the ‘OK’ confirmation, it means everything is fine.

WordPress permalinks should work now.

Otherwise, it means there is an error in the configuration.

If the wordpress installation is in a folder (e.g. WP1), add the following after the location block:

 location /WP1 { 
        try_files $uri $uri/ /WP1/index.php?q=$uri$is_args$args; 

 service nginx restart

csf block lists enable

The CSF firewall is turned on by default in Centmin Mod.

You can block the bots network from accessing your site by turning on the blocklists

 nano /etc/csf/csf.blocklists

Enable all or most of the blocklists by deleting the # sign against them.

Restart csf

 csf –r 

Delete website created by Centmin Mod

Follow these steps to delete/ remove a site created by Centmin Mod

Back up, if required

cp -a /usr/local/nginx/conf/conf.d/ /usr/local/nginx/conf/conf.d/
cp -a /home/nginx/domains/ /home/nginx/domains/

Delete domain

rm -rf /usr/local/nginx/conf/conf.d/
rm -rf /usr/local/nginx/conf/conf.d/
rm -rf /home/nginx/domains/

1 thought on “How To Install Centmin Mod With WordPress | An Easy Installation Guide

Leave a Reply

Your email address will not be published. Required fields are marked *