Majority of the webmasters online today will install WordPress with either Apache2 or Nginx HTTP servers… However, HTTP servers like OpenLiteSpeed and Lighttpd can also provide performance benefits for your WordPress content..
This brief tutorial shows students and new users how to install WordPress on Ubuntu 16.04 LTS with OpenLiteSpeed, MariaDB and PHP 7.1 support. If you haven’t heard of OpenLiteSpeed, is an open source web server developed by LiteSpeed Technology. It’s designed to be lightweight with a user friendly web interface to create and manage your websites.
You will learn how to install OpenLiteSpeed with MariaDB and PHP 7.1… and how to configure OpenLiteSpeed to allow WordPress to work. When you’re ready, continue with the steps below:
Step 1: Update the Ubuntu
It’s always good to update Ubuntu server prior to installing new packages… to update Ubuntu, run the commands below
Now that all dependencies are installed, go and fetch the latest version of OpenLiteSpeed. The commands below will download version 1.4.27 to your server..
cd /tmp/ && wget http://open.litespeedtech.com/packages/openlitespeed-1.4.27.tgz
Next, run the commands below to extract the downloaded package.
tar -xvzf openlitespeed-1.4.27.tgz
Change into the directory extracted directory
Then run the commands below to install OpenLiteSpeed.
sudo make install
After that OpenLiteSpeed should be installed and ready to use.
Step 4: Configure OpenLiteSpeed
Finally, configure the administrative password for the web interface. Run the commands below to do that.
Then create a web admin username and password.
Please specify the user name of administrator.
This is the user name required to login the administration Web interface.
User name [admin]: openlite
Please specify the administrator's password.
This is the password required to login the administration Web interface.
Retype password: retype_password
Administrator's username/password is updated successfully!
After that, run the commands below to start the webserver.
sudo /etc/init.d/lsws start
Open your browser and browse to the server IP or hostname followed by 8088 to view the default page page.
To access the admin backend portal, use the port 7078
Now that OpenLiteSpeed is up, go and download WordPress content. To do that, run the commands below… you will download, extract and copy WordPress content to OpenLiteSpeed default document root.. The default Virtual Host Root is at /usr/local/lsws/Example
cd /tmp && wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz
sudo mv wordpress /usr/local/lsws/Example/wordpress
Then run the commands below to set the correct permissions for WordPress root directory.
Enter the highlighted text below that you created for your database and save.
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
/** Database Charset to use in creating database tables. */
/** The Database Collate type. Don't change this if in doubt. */
Save the file and you’re done.
After that, open your browser and browse to OpenLiteSpeed backend portal..
Go to the Dashboard and select Server Configuration==>External App… then click Edit as shown in the image below…
Then scroll to Command, then change the command to reflect the symbolic link created above for PHP 7.1 and save.
Next, go to Virtual Hosts ==> View to edit the current VirtualHost settings..
When the settings page opens, click the General tab and edit the Document Root location.. to where we installed our WordPress content in the wordpress folder…
On the same General tab, edit the Index File section and replace index.html with index.php shown below…. save the exit.
Next, go to Virtual Hosts ==> Rewrite and edit it… then turn on Rewrite Control to Yes
Next edit the Rweire Rules and replace the code with the one below, then save and exit..