How to Install WordPress on an OpenLiteSpeed Web Server

How to install WordPress on OpenLiteSpeed

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.

YouTube video

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

Facebook
Twitter
Pinterest
LinkedIn
Reddit

Meet Tony

Tony from Tony Teaches Tech headshot

With a strong software engineering background, Tony is determined to demystify the web. Discover why Tony quit his job to pursue this mission. You can join the Tony Teaches Tech community here.

Leave a Reply

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