How to Install WordPress on an OpenLiteSpeed Web Server

by

Hey there! Some links on this page may be affiliate links which means that, if you choose to make a purchase, I may earn a small commission at no extra cost to you. I greatly appreciate your support!

In this tutorial, you’ll learn how to install WordPress on OpenLiteSpeed. If you want to know how to setup an OpenLiteSpeed web server, check out this tutorial here.

1. Create WordPress Database

First, create a database for your WordPress website. We will use MySQL. MariaDB works too. Enter the MySQL command prompt by typing mysql -u root -p on your server.

create database wordpress default character set utf8 collate utf8_unicode_ci;
create user 'wordpress_user'@'localhost' identified by 'S3xfk2XsQPzBH6wJ!';
grant all privileges on wordpress.* TO 'wordpress_user'@'localhost';
flush privileges;
exit

This will create a database called wordpress and a user called wordpress_user. We will grant all privileges on all tables in the wordpress database to wordpress_user.

2. Download and Install WordPress Source Code

Next, we can download WordPress from the official website.

cd /usr/local/lsws/Example
wget https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
rm latest.tar.gz

Note that the default OpenLiteSpeed virtual host exists in the Example directory at /usr/local/lsws/; however, you can choose any directory.

Let’s recursively set the appropriate permissions for the WordPress files and folders.

find wordpress/ -type d -exec chmod 750 {} \;
find wordpress/ -type f -exec chmod 640 {} \;

3. Configure OpenLiteSpeed for WordPress

Finally, we need to tell OpenLiteSpeed about WordPress. This involves setting the document root and index files as well as optionally setting a domain name and domain alias from within the OpenLiteSpeed WebAdmin console in a browser.

The following video will walk you through the process.

Please let me know if you have any questions about installing WordPress on OpenLiteSpeed.


About The Author

With a strong software engineering background, Tony is determined to help as many people as possible start their online busines. Discover why Tony quit his hedge fund job to pursue this mission. You can send Tony a message here.

Leave a Comment