WordPress on OpenLiteSpeed

Install WordPress on OpenLiteSpeed Server

In this article, we have managed to share a brief guide on installing WordPress on OpenLiteSpeed server running Ubuntu 18.04 / Ubuntu 20.04.

This installation is for OpenLiteSpeed Server only.

LiteSpeed Web Server, is the leading high-performance, high-scalability web server software. It is the 5th most popular web server, estimated to be used by 6.4% of websites as of April 2020. LSWS is developed by privately held LiteSpeed Technologies.

LiteSpeed web server is available in follwing editions. These editions are listed below:

  1. OpenLiteSpeed Edition – This is the open-source edition of LiteSpeed webserver, mainly used for individual sites that don’t change often. This is because OpenLiteSpeed requires a restart to load any new .htaccess file.
  2. Enterprise Edition – This edition is widely used for shared hosting environments, where updates are frequent. Enterprise edition has the highest level of stability and is supported by cPanel. It also integrates with the DirectAdmin control panel. This server autodetects changes to .htaccess and adjusts as necessary without a restart.

This tutorial needs to have OpenLiteSpeed server installed. If you have already installed kindly ignore, otherwise follow our guide on install and configure OpenLiteSpeed server on Ubuntu.

Login to OpenLiteSpeed Server

First login to the server

Let’s go to the LSWS directory and make the following directories:

sudo mkdir example.com

sudo mkdir example.com/{conf,html,logs}

Go to the website root folder just created

cd /usr/local/lsws/example.com/html

Download and Extract WordPress

wget http://wordpress.org/latest.zip
unzip latest.zip

Now an additional folder will be created named ‘wordpress‘. I like to put all my files in ‘html‘ folder. So I’m going to move all files one level up. that is /html/wordpress to /html/

sudo mv  -v /usr/local/lsws/example.com/html/wordpress/* /usr/local/lsws/example.com/html

Grant the Web Server User Write Permission to Create wp-config.php During Installation

sudo chown -R nobody:nobody html

Set Up Index File

An index file needs to be set in the LiteSpeed Web Admin Console. Navigate to Virtual Hosts > Select Virtual Host from List > General > Index Files, click Edit in the top right corner, and enter index.html,index.php in the Index Files box.

index file setup openlitespeed

Add a Rewrite Rule in the vHost

Go to the WebAdmin Console > Virtual Hosts > Example > General > Rewrite. Then change the following settings:

  • Enable Rewrite > Yes.
  • Auto Load from .htaccess > Yes

Restart Server

When you are finished, click the Save icon to save your changes, then click the Graceful Restart button.

Also read: How to Highlight Text in WordPress Posts

Run the WordPress Install Script

Point your browser with default port to http://server_ip:8088/wordpress/wp-admin/install.php

1. Run Install

As you can see, WordPress will ask all database related information on next step and will create wp-config.php file using this information. If for some reasons (mostly permissions issues) WordPress is not able to create this file, it will provide you with data which you can copy and manually create wp-config.php file inside your WordPress home.

install script

Step 2.Database Configuration

We’ve already created the database above. Just enter details and click Next.

wordpress db configuration

Step 3. Input General Configuration

On this page, the installer asks some general questions about the site. You can fill them in as required.
Once done, click Install.

enter wordpress details

WordPress is now successfully installed, you can browse at:

  • Front page: http://server_IP:8088/wordpress/
  • Admin page: http://server_IP:8088/wordpress/wp-admin

Follow TechBiriyani on FacebookTwitter to get all the latest updates.

Leave a Reply

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