Skip to content
Follow
CMS

How to Install Drupal with OpenLiteSpeed on Ubuntu Linux

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

Installing Drupal with OpenLiteSpeed on Ubuntu Linux creates a fast and efficient setup for your website.

Drupal is a free tool for building websites and managing content, like a powerful online organizer. OpenLiteSpeed is a speedier, lighter web server, making your website load quickly and easily.

This combination offers a better performing alternative to common web servers like Apache or Nginx. Testing shows it can be over 10% faster.

⚡ Quick Answer

Install OpenLiteSpeed, download Drupal to `/tmp`, move it to `/usr/local/lsws/Example/drupal`, and set permissions. Create a database and user in MySQL. Finally, configure OpenLiteSpeed’s Virtual Host document root and index files, enable rewrite rules, and reload the server.

How to install OpenLiteSpeed on Ubuntu Linux

Installing OpenLiteSpeed on Ubuntu Linux means setting up the web server, the most recent PHP version, and the MariaDB database, which are all needed to run Drupal.

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 Drupal.

How to Install OpenLiteSpeed on Ubuntu Linux – Website for Students

After installing OpenLiteSpeed, continue below.

How to download Drupal on Ubuntu Linux for OpenLiteSpeed

After getting OpenLiteSpeed set up on Ubuntu, you need to download the latest Drupal package and place its files where your web server can find them to install Drupal for OpenLiteSpeed.

Command Prompt
cd /tmp
wget https://www.drupal.org/download-latest/tar.gz
tar -zxvf tar.gz

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

🐧Bash / Shell
sudo mv /tmp/drupal-* /usr/local/lsws/Example/drupal

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

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

How to create a Drupal database on Ubuntu

Creating a Drupal database on Ubuntu involves setting up a new database specifically for Drupal and a separate user account for it, which is a key step to create a Drupal database.

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

🐧Bash / Shell
sudo mysql -u root -p

Then, create a database called drupaldb

💻Code
CREATE DATABASE drupaldb;

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

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

Then, grant the user full access to the database.

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

Finally, save your changes and exit.

💻Code
FLUSH PRIVILEGES;
EXIT;

How to configure OpenLiteSpeed to support Drupal

To configure OpenLiteSpeed to support Drupal, you need to log into its admin panel and change the Document Root setting to point to where your Drupal files are stored.

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

Login using the admin login details above.

OpenLiteSpeed admin panel interface for server management
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 Drupal folder created above.

PowerShell
$VH_ROOT/drupal/
Document root configuration for WordPress 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
Index file setup for WordPress 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 in OpenLiteSpeed for WordPress
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
ReWriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^/ index.php [L]
<IfModule LiteSpeed>
CacheLookup on
</IfModule>
Rewrite rules configuration for WordPress on 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 Drupal setup wizard should appear. Follow the wizard to complete the setup.

Select the installation language, then click Save and Continue.

Drupal install composer
drupal ubuntu install

On the next screen, choose the Standard installation option to include commonly used pre-configured features.

This is the most popular option for most websites running Drupal CMS.

drupal ubuntu install
drupal ubuntu install 1
⚠️Warning
Next, type in the database connection info, click Save and continue.
Drupal ubuntu setup
drupal ubuntu install 2

After that, enter the site information, including the Site name, Site admin email address, username, and password, and continue.

Drupal ubuntu install
drupal ubuntu install 3

When you’re done, Drupal should be installed and ready to use. Login as admin and begin configuring your site.

Drupal Install Ubuntu
drupal ubuntu install 4

That should do it!

Conclusion:

This guide shows how to install the Drupal content management system on Ubuntu Linux with the OpenLiteSpeed web server. Users can report errors or share information using the comment form below.

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 Drupal with Nginx on Ubuntu 24.04
CMS How to install Drupal with Nginx on Ubuntu 24.04
How to Install OpenLiteSpeed on Ubuntu Linux
Ubuntu Linux How to Install OpenLiteSpeed on Ubuntu Linux
How to Install Drupal with Nginx and Cloudflare on Ubuntu
CMS How to Install Drupal with Nginx and Cloudflare on Ubuntu
Install Drupal with Lighttpd on Ubuntu 24.04
CMS Install Drupal with Lighttpd on Ubuntu 24.04

0 Comments

  • hi, i install drupal as you explain but i have problem with borken images, site installs image but the image styles can not created. I think litespeed can not read htaccess rewrit direcktives. I use cyberpanel with opnlitespeed. Thank you for information.

    Reply

Leave a Comment

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