Host WordPress on LiteSpeed in CentOS 8 With CyberPanel

Table Of Contents

Share Article

In the last year, the LiteSpeed webserver started to be more popular because of the higher speed over NGINX and Apache. Also if you are using WordPress LiteSpeed has a popular caching plugin LiteSpeed Cache that is free and can speed your WordPress website for free.

Besides the performance implications LiteSpeed it is also utilizing the .htaccess file that makes it compatible with Apache web servers.

I am techy and I like to host my own sites on the VPS server and that’s why I have tried a few throughout the year. I have written some articles with what I have used before:

The last one WordOps was the shortest used because all the sites were using the same user at OS level and when one was infected all got infected. Because of this, I have decided to change it and try something new that doesn’t have this issue.

If you are interested to see how the best VPS providers compare check the DigitalOcean vs Vultr vs Hetzner article.

Now I am using CyberPanel a free web panel that used LiteSpeed and doesn’t have the accounts under the same user. CyberPanel is free to use and it can be installed on the new CentOS 8. It has the bellow features included:

  • DNS
  • Let’s Encrypt SSL
  • Email
  • Chose from Multiple PHP Version
  • LiteSpeed webserver
  • Redis and Memcache

In short it comes with everything you need to host your site on a VPS.

Bellow, you have all the steps you need to do from start to finish to have a WordPress website installed and working on CyberPanel.

Video With All the Process

1. Get a Domain Name

The first thing you need to do is to get your domain name as the server will need to be configured with the domain name and have the name servers set up. You can use namecheap for this, you just go and register the domain you want. We will configure it after the server is installed.

2. Create a CentOS 8 VPS

You will need to have a VPS where you can install CyberPanel. The minimum recommendation is 1 GB of memory and at least 10 GB of space. I am recommending Vultr or DigitalOcean . For a more affordable option to DigitalOcean, you can check this Hetzner Review.

After you will need to connect over SSH to the new server and start the install process.

3. Install CyberPanel on CentOS 8

3.1 Update CentOS 8

Even if this is a new server you will still want to update the OS to the last version you can do so with the bellow commands:

 sudo yum update
 sudo yum upgrade

3.2 Install CyberPanel

Run the below command and the install process will start:

sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh)

After the install process will start you need to choose in the order:


                CyberPanel Installer v2.01

  1. Install CyberPanel.

  2. Addons and Miscellaneous

  3. Exit.


  Please enter the number[1-3]: 1

                CyberPanel Installer v2.01

  RAM check : 161/818MB (19.68%)

  Disk check : 2/25GB (9%) (Minimal 10GB free space)

  1. Install CyberPanel with OpenLiteSpeed.

  2. Install Cyberpanel with LiteSpeed Enterprise.

  3. Exit.


  Please enter the number[1-3]: 1


Install Full service for CyberPanel? This will include PowerDNS, Postfix and Pure-FTPd.

Full installation [Y/n]: Y

Full installation selected...

Press Enter key to continue with latest version or Enter specific version such as: 1.9.4 , 1.9.5 ...etc


Branch name set to v2.0.1

Please choose to use default admin password 1234567, randomly generate one (recommended) or specify the admin password?
Choose [d]fault, [r]andom or [s]et password: [d/r/s] s

Please enter your password:
xxx

Please confirm  your password:

xxx

Do you wish to install Memcached extension and backend?
Please select [Y/n]: y

Do you wish to install Redis extension and backend?
Please select [Y/n]: y

After the install process will run for 15-20 minutes and in the end you will be prompted with the admin URL, user, and pass. Also, a question to restart the server. The URL should be https://<publicipd>:8090

3.3 Add the Nameserver in CyberPanel

After the server is rebooted you login to the admin dashboard and configure the nameserver to be used. In DNS – Create Nameservers. Add your details by replacing the domain , nameservers and IP with your own.

3.4 Add the Nameservers on the Domain

Go to namecheap and in the advanced DNS add your custom nameservers with the IP as in the bellow picture:

After going into the domain area and nameserver and add the ns1.domain.tld and ns2.domain.tld (replace domain.tld with your own domain) and save it as bellow:

You may need a day until all the changes are reflected. After you can go and add the domain in CyberPanel and install WordPress with a SSL certificate.

4. Add the Domain in CyberPanel and Install WordPress

4.1 Add the domain name

Now what remains to do is to add your domain to the webserver. To do this you need to access your admin area and go under: Websites – Create Websites and add the domain:

You can choose the package (only 1 by default) and the owner (admin by default) and select the PHP version and features like SSL, DKIM ( in case you want to send email), and hit create the website.

4.2 Install WordPress

After the domain is added to CyberPanel you can proceed with WordPress install, you need to be patient as if this is a new domain name it can take up to 2 days for the DNS to be updated. To install WordPress go under Websites – List Websites and click Manage:

After you can go under Application Installer and choose WP + LSCache:

Then complete the details with the username and password and hit Install Now

After the installation will kick in and install WordPress with LSCache plugin.

4.3 Configure WordPress

Next, you need to go under WordPress admin in Settings – General and add the https and www (if this is what you want for your site)

Hit Save and then relogin as WordPress will send you to the https version. After you need to change the permalinks from Settings – Permalinks:

4.4 Restart Lite Speed

For the permalinks to work and not have 404 you need to restart the webserver lite speed, you go in admin UI and under Server StatusLite Speed Status hit reboot lite speed

After the permalinks will work.

4.5 Configure the Caching Plugin

After to speed up your website you should go and make some extra configs to the LSCache and activate the object (Memcache or Redis) and browser cache. You can make some extra configs to the page cache. You can check the video for the complete tutorial.

5. Some Speed Tests on CyberPanel

After everything is configured with the default install I have made some speed tests and below are the results. The theme used is the free one Kadence.

As can be seen, the site is loading very fast, of course, this is an empty site but you can test one of mine like www.wpdoze.com or bitdoze.org they are full sites with a lot of plugins (especially this one).

The server load on 1 CPU and 1 GB of memory is as bellow:

top - 14:53:49 up  1:05,  1 user,  load average: 0.05, 0.05, 0.08
Tasks: 116 total,   2 running, 114 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.3 us,  0.3 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    818.6 total,    175.9 free,    344.5 used,    298.2 buff/cache
MiB Swap:    818.0 total,    629.2 free,    188.8 used.    306.0 avail Mem

From the look of it the server will benefit if you have more memory, a 2 GB will be the best.

Become a CloudPanel Expert

This course will teach you everything you need to know about web server management, from installation to backup and security.
Leave a Reply

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