Use Centmin Mod for The Fastest WordPress Website

Use Centmin Mod for The Fastest WordPress Website

Share This

Centmin Mod is a CLI installer for the LEMP stack. In this tutorial, we’ll show you how to use Centmin Mod to install a WordPress website on a CentOS server.

Centmin Mod is an auto-installer of the LEMP stack which is already optimized and configured for the best performance by default. In short, if you want an optimized, fast website without doing too much manual work, this tool is perfect for you.

Requirements

  • For this tutorial, you’ll need a CentOS 7 VPS. You can get one from Vultr. The server should have at least 1GB of RAM.
  • And root access to the server (you’ll get root access with a Vultr VPS). You’ll need to use the full root user rather than a sudo user.

Login to the server and follow the instructions below.

Step 1: Update your server and install needed packages

The first step, as always, is to update your server:

yum update -y

If curl and nano aren’t already installed on your server, run the following command:

yum install nano curl -y

If you plan on using a different text editor, then you won’t need nano. In our tutorial, we’ll be using nano.

Step 2: Disable SELinux

Next, in order for Centmin Mod to work, you’ll need to disable SELinux. If you get a server from Vultr, they have a CentOS option without SELinux from the start.

You can temporary disable SELinux following command:

setenforce 0

To permanently disable SELinux (recommended), open the following file:

nano /etc/selinux/config

and update the SELinux line to:

SELINUX=disabled

Step 3: Install Centmin Mod

You can either install the stable release or the beta release. It’s recommended to install the beta release as you’ll get newer features, including PHP 8. In this tutorial, we’ll install the beta release.

To install the beta version of Centmin Mod with PHP 8, run the following commands:

curl -O https://centminmod.com/betainstaller80.sh && chmod 0700 betainstaller80.sh && bash betainstaller80.sh

The commands are pretty similar for the quick curl install for the stable release too, or if you want to use other PHP versions. Check their install page for more info.

The install command will take a few minutes. After it’s done, you can start Centmin Mod by running the following simple command:

centmin

The first time you run Centmin Mod you’ll be prompted for an email and a few additional steps will be taken. After that, every time you run centmin you’ll get the Centmin Mod menu. This menu has 23 options, all ranging from adding an Nginx vhost, to PHP upgrade/downgrade, and of course installing an optimized stack with WordPress.

(Optional) Step 4: Prepare the tool for Let’s Encrypt

This step is optional but highly recommended. In order for Centmin Mod to set up Let’s Encrypt (with auto-renewal, redirection, and everything else you’d need), first, you’ll need to create a file:

nano /etc/centminmod/custom_config.inc

Or you can just run

customconfig

To execute the same command.

Next, you need to add this line to the file:

LETSENCRYPT_DETECT='y'

Step 5: Install WordPress

To install the optimized (fast and secure) WordPress stack with Centmin Mod, start the tool as explained in Step 3 and choose option 22: “Add WordPress Nginx vhost + Cache Plugin” ie. type 22 and hit enter.

The tool will guide you through the installation and prompt you a few times for your domain name, whether to pre-install some themes and plugins etc. All prompts are pretty self-explanatory. Go through all the prompts carefully.

Once the script finishes, you’ll get a bunch of information. Copy it and store it somewhere safe. You’ll get all your needed usernames and passwords, file locations, etc.

To complete the setup, login to your new WordPress website and do steps that the script recommends (you’ll get them after the script is done). These may differ depending on the Centmin Mod version or what stack you’re using, but all the steps are self-explanatory and pretty easy to do. The steps, in short, are to basically enable permalinks and finish configuring the plugins and themes. It only takes a minute.

And that’s pretty much it! Now you have a fast, optimized, secure WordPress website with caching enabled on an optimized LEMP stack with free HTTPS (Let’s Encrypt).

You can repeat the same process multiple times for multiple websites. It only takes a minute to create a new WordPress website with Centmin Mod.

If you’re using a CLI tool, we’ll just assume you enjoy spending time in the CLI. WP-CLI is a great and powerful command-line tool that you can use to manage all your WordPress websites. It will be pre-installed if you used option 22.


Share This

Leave a comment

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