How to Install WordPress with LSCache, OpenLiteSpeed and CyberPanel

OpenLiteSpeed is a high-performance event-driven open source web server developed and maintained by LiteSpeed Technologies. In this article, we will see how we can use CyberPanel to get up and running with LSCache and WordPress on OpenLiteSpeed in few clicks.

What is LSCache?

LSCache is a full-page cache built directly into OpenLiteSpeed web server, it is similar to Varnish but more efficient because we remove the reverse proxy layer from the picture when LSCache is used.

LSCache WordPress Plugin!

LiteSpeed has also developed a WordPress plugin that communicates with OpenLiteSpeed web server to cache the dynamic content which greatly reduces the load time, increases performance and puts less load on your server.

LiteSpeed’s plugin provides powerful cache-management tools that, due to LSCache’s tight integration into the server, are impossible for other plugins to replicate. These include tag-based smart purging of the cache, and the ability to cache multiple versions of generated content based on criteria such as mobile vs. desktop, geography, and currency.

LSCache has the ability to cache personalized copies of a page, which means that caching can be extended to include logged-in users. Pages that are publicly uncacheable may be cached privately.

In addition to LSCache’s advanced cache-management capabilities, the WordPress plugin also provides additional optimization functionality such as CSS/JS minification and combination, HTTP/2 Push, lazy load for images and iframes, and database optimization.

What is CyberPanel?

CyberPanel is a control panel on top of OpenLiteSpeed, you can use it to create websites and install WordPress with one click.

It also features:

  • FTP
  • DNS
  • Email
  • Multiple PHPs

In this article, we will see how we can efficiently make use of all of these technologies to get up and running in no time.

Step 1: Install CyberPanel – ControlPanel

1. The first step is to install CyberPanel, you can use the following commands to install CyberPanel on your Centos 7 VPS or dedicated server.

# wget http://cyberpanel.net/install.tar.gz
# tar zxf install.tar.gz
# cd install
# chmod +x install.py
# python install.py [IP Address]

After successful CyberPanel installation, you will get login credentials as shown below.

###################################################################
                CyberPanel Successfully Installed                  
                                                                   
                                                                   
                                                                   
                Visit: https://192.168.0.104:8090                
                Username: admin                                    
                Password: 1234567                                  
###################################################################

2. Now login into CyberPanel using above credentials.

CyberPanel Login
CyberPanel Login
Cyber Panel Dashboard
Cyber Panel Dashboard

Step 2: Install WordPress in CyberPanel

3. To setup WordPress with LSCache, first we need to create a website by going to Main > Websites > Create Website section and fill out all details as shown.

Create Website in CyberPanel
Create Website in CyberPanel

4. Now go to Main > Websites > List Websites section, click on Launch icon to launch the website panel, so that WordPress can be installed.

List Websites
List Websites

Once the website panel is launched you will have the following options on your screen:

Website Information
Website Information

5. On this window, open File Manager and delete everything from the public_html folder. Now scroll down to the bottom and you will see a tab which says WordPress with LS Cache.

Install WordPress with LSCache
Install WordPress with LSCache

6. In the path box do not enter anything if you want WordPress to be installed in the website document root. If you enter any path it will be relative to the website home directory.

For example, if you enter wordpress, your WordPress installation directory will be tecmint.com/wordpress.

7. Once you click on “Install WordPress“, CyberPanel will download WordPress and LSCache, create the database, and setup a WordPress site. Once CyberPanel is finished installing WordPress you will need to visit your website domain to configure your website.

WordPress Installation Completed
WordPress Installation Completed

In this example we’ve used tecmint.com, so we will visit this domain to configure our site. These are very basic settings and you can follow the onscreen instructions to complete your configurations.

Step 3: Activate LiteSpeed Cache Plugin

8. Once WordPress is installed, you can login to the dashboard at https://tecmint.com/wp-admin. It will ask for the username/password combination that you set up during wordpress configuration.

Activate LSCache on WordPress
Activate LSCache on WordPress

The LSCache plugin is already installed, so you just need to go into Installed Plugins in your WordPress dashboard and activate it.

9. Now verify LSCache by going to example.com and see your responce headers will look something like.

Check LSCache Headers
Check LSCache Headers

You can see that this page is now served from cache and the request didn’t hit the backend at all.

Step 4: Advance LiteSpeed Cache Options

  • Purge Cache – If for some reason you want to purge the cache you can do so via the LSCache. On this page you have numerous ways to purge the cache.
LSCache Purge
LSCache Purge

Minify, Combine, and HTTP/2 Push

  • Minification – When code is minified, all unnecessary whitespace characters, newline characters, and comments are removed. This shrinks the size of the source code.
  • Combination – When a website includes several JavaScript (or CSS) files, those files may be combined into one. This reduces the number of requests made by the browser and, if there was duplicate code, it is removed.
  • HTTP/2 Push – This functionality allows the server to anticipate the browser’s needs and act upon them. One example: when serving index.html, HTTP/2 can reasonably assume that the browser also wants the included CSS and JS files, and will push them, too, without being asked.

All of the above measures give OpenLiteSpeed the ability to serve content faster. These settings can be found in the LiteSpeed Cache settings page under the Optimize tab, and they are all disabled by default. Press the ON button next to each setting that you’d like to enable.

It is possible to exclude some CSS, JS, and HTML from being minified or combined. Enter the URLs to these resources in the appropriate boxes, one per line, to exclude them.

Step 5: Change Default PHP and Install Extensions

10. If, for some reason, you need to change the PHP version for your WordPress website you can do so via CyberPanel:

Change PHP Version
Change PHP Version

11. Some additional WordPress plugins may require you to install additional PHP extensions, or you may want to add Redis to WordPress. You can install missing extensions via CyberPanel from the Server > PHP > Install Extensions tab.

First select the PHP version from the drop down for which you want to install the extension. In the search box, enter the extension name, and finally click Install to install the missing extension.

Install PHP Extensions
Install PHP Extensions

For more information read CyberPanel and OpenLiteSpeed Documentation.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Usman Nasir
Usman Nasir, the founder, and author of Cyberpersons is a Computer Science graduate. He also worked as a technical support staff at various hosting companies and love to write about Linux and web application security.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

12 Comments

Leave a Reply
  1. Tried this on a 1Gb server on vultr the panel is painfully slow. webmail its still loading :) I’ve tried many other webpanels but they are pretty good at least the speed.

    Reply
    • Which control panel software are you transferring from?

      Normally you just need to upload files via Filemanager and restore your database from PHPMyAdmin.

      Reply
    • Good question. Whenever someone write this type of blog, it is recommend to add the comparison benchmarks. That will add more value to these type of posts.

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.