Skip to content
Follow
CMS

Install WordPress on Ubuntu with OpenLiteSpeed

Richard
Written by
Richard
Sep 12, 2021 Updated Jul 14, 2026 4 min read
openlitespeed admin panel
openlitespeed admin panel

Installing WordPress on Ubuntu with OpenLiteSpeed sets up your website using a fast web server and the popular WordPress application.

OpenLiteSpeed is a quick, free web server that many choose over older options like Apache or Nginx because it’s speedy and simple to use.

Getting WordPress 6.5.1 running on Ubuntu with OpenLiteSpeed can make your website load much faster than with typical setups, giving visitors a better experience.

You manage both OpenLiteSpeed and your WordPress site through a friendly web control panel. This makes it easy to change settings and manage your site without needing to be a tech expert.

⚡ 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 involves setting up the web server, the latest PHP version, and the MariaDB database, which are all needed to run WordPress smoothly.

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 Linux, you’ll download the latest WordPress files using commands and move them to the right folder. This makes sure OpenLiteSpeed can find and use your WordPress site.

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 a necessary step to store all your website’s content, like posts and user details. This guide shows you the exact commands to set up a new database and user for WordPress.

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 logging into its admin panel and setting the Document Root. This tells the server where your WordPress files are, which is essential for your website to load correctly.

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

Login using the admin login details above.

OpenLiteSpeed admin panel interface on Ubuntu
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
💡Tip
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
📝Good to Know
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 automatic file creation fails, the system fills in database information within a configuration file. Users can manually open the `wp-config-sample.php` file in a text editor, input their specific database details, and then save the file as `wp-config.php` to complete the setup.

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 guide explains installing WordPress on Ubuntu Linux with the OpenLiteSpeed web server. Report errors or share information about the WordPress installation process using the comment form below this page.

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.

📚 Related Tutorials

How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install KDE Desktop on Ubuntu 24.04
Ubuntu Linux How to Install KDE Desktop on Ubuntu 24.04
How to Setup WordPress with Nginx and Cloudflare on Ubuntu
CMS How to Setup WordPress with Nginx and Cloudflare on Ubuntu
How to install Open-VM Tools on Ubuntu 24.04
Ubuntu Linux How to install Open-VM Tools on Ubuntu 24.04

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

Leave a Comment

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