Skip to content
CMS

Install WordPress on Ubuntu with OpenLiteSpeed

Richard
Written by
Richard
Sep 12, 2021 Updated Jun 20, 2026 4 min read
openlitespeed admin panel

You can install WordPress on Ubuntu with OpenLiteSpeed by setting up the OpenLiteSpeed web server and then installing the WordPress application.

OpenLiteSpeed is a fast, open-source web server, often chosen as a modern alternative to Apache or Nginx for its performance and user-friendly interface.

This guide focuses on getting WordPress 6.5.1 running on your Ubuntu machine using this efficient stack.

You will learn to configure OpenLiteSpeed and manage your WordPress site directly through its intuitive web admin panel.

⚡ Quick Answer

Install OpenLiteSpeed and the MariaDB server first. Then, download WordPress, move it to the OpenLiteSpeed directory, and set permissions. Create a WordPress database and user, then configure OpenLiteSpeed’s Virtual Hosts to point to your WordPress installation and enable rewrite rules.

How to install OpenLiteSpeed on Ubuntu Linux

Installing OpenLiteSpeed on Ubuntu Linux is the first step to running WordPress smoothly, and this guide will show you exactly how to do it.

This post below shows you how to install OpenLiteSpeed, the latest PHP version, and the MariaDB database server. Those three components are required to run WordPress.

How to Install OpenLiteSpeed on Ubuntu Linux – Website for Students

After installing OpenLiteSpeed, continue below.

How to download WordPress on Ubuntu Linux for OpenLiteSpeed

After setting up OpenLiteSpeed on Ubuntu, you’ll need to download the WordPress package to get your site files ready.

Command Prompt
cd /tmp
wget https://wordpress.org/latest.tar.gz
tar -zxvf latest.tar.gz

After extracting the WordPress archive, move the WordPress content into the OpenLiteSpeed default VirtualHost directory.

🐧Bash / Shell
sudo mv /tmp/wordpress /usr/local/lsws/Example/wordpress

Next, run the commands below to change the permissions of the WordPress folder to run on OpenLiteSpeed.

🐧Bash / Shell
sudo chown -R nobody:nogroup /usr/local/lsws/Example/wordpress/
sudo chmod -R 755 /usr/local/lsws/Example/wordpress/

How to create a WordPress database on Ubuntu

Creating a WordPress database on Ubuntu is essential for storing your website’s content, and we’ll walk you through setting one up.

To create a database for WordPress, run the commands below:

🐧Bash / Shell
sudo mysql -u root -p

Then, create a database called wpdb

💻Code
CREATE DATABASE wpdb;

Next, create a database user called wpdbuser and set a password

💻Code
CREATE USER 'wpdbuser'@'localhost' IDENTIFIED BY 'new_password_here';

Then, grant the user full access to the database.

💻Code
GRANT ALL ON wpdb.* TO 'wpdbuser'@'localhost' WITH GRANT OPTION;

Finally, save your changes and exit.

💻Code
FLUSH PRIVILEGES;
EXIT;

How to configure OpenLiteSpeed to support WordPress

Configuring OpenLiteSpeed to support WordPress involves adjusting settings in its admin panel, which we’ll guide you through step-by-step.

🐘PHP
https://localhost:7080/login.php

Login using the admin login details above.

openlitespeed admin panel

After logging on, go to the Virtual Hosts ==> General tab and edit the Document Root location section.

Then, edit the Document Root to point to the WordPress folder created above.

PowerShell
$VH_ROOT/wordpress/
WordPress document root configuration on OpenLiteSpeed
wordpress on openlitespeed document root

On the same General tab, edit the Index Files section and replace index.html with index.php, as shown below.

🐘PHP
index.php
WordPress index file setup on OpenLiteSpeed
wordpress on openlitespeed index file

Next, go to Virtual Hosts ==> Rewire Rules, edit Rewrite Control, then choose Yes to enable rewrite.

Save your change.

Enabling rewrite control for WordPress on OpenLiteSpeed
wordpress enable rewrite control

Next, under Virtual Hosts ==> Rewrite, edit the Rewrite Rules. Copy and paste the lines below into the rules box and save.

🐘PHP
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
WordPress rewrite rules configuration for OpenLiteSpeed
wordpress rewrite rules openlitespeed

After making all the changes above, reload OpenLiteSpeed.

Reloading changes in OpenLiteSpeed server settings
openlitespeed reload changes

Finally, open your web browser and browse to the server hostname or IP address.

💻Code
http://localhost

A WordPress setup wizard should appear. Follow the wizard to complete the setup.

WordPress Ubuntu Installation
wordpress 50 ubuntu install

You will need to know the following items before proceeding. Use the database connection info you created above.

  • Database name
  • Database Username
  • Database password
  • Database host
  • Table prefix (if you want to run more than one WordPress in a single database)

The wizard will use the database information to create a wp-config.php file in the WordPress root folder.

If this automatic file creation doesn’t work for any reason, don’t worry. All this does is fill in the database information to a configuration file. You may also simply open wp-config-sample.php in a text editor, fill in your information, and save it as wp-config.php.

WordPress Ubuntu Installation
wordpress 50 ubuntu install 1

Next, type in the database connection info and click Submit

WordPress Ubuntu Installation
wordpress 50 ubuntu install 2

After that, click the Run the Installation button to have WordPress complete the setup.

WordPress Ubuntu Installation
wordpress 50 ubuntu install 3

Next, create the WordPress site name and the backend admin account, then click Install WordPress.

WordPress installation on Ubuntu
wordpress 50 ubuntu install 4

When you’re done, WordPress should be installed and ready to use.

WordPress Ubuntu install
wordpress 50 ubuntu install 5

That should do it!

Conclusion:

This post showed you how to install WordPress on Ubuntu Linux with an OpenLiteSpeed web server. Please use the comment form below if you find any errors above or have something to add.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

No comments yet — be the first to share your thoughts!

Leave a Comment

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

Exit mobile version