Skip to content
Follow
CMS

How to Install Drupal with OpenLiteSpeed on Ubuntu Linux

Richard
Written by
Richard
Sep 12, 2021 Updated Mar 18, 2026 4 min read
openlitespeed admin panel
openlitespeed admin panel

You install Drupal with OpenLiteSpeed on Ubuntu Linux by setting up a robust web server environment for your content management system.

Drupal is a versatile, free and open-source content management system (CMS) for creating dynamic websites. OpenLiteSpeed is a fast, lightweight web server that boasts excellent performance and an easy-to-use admin panel.

This setup provides a powerful alternative to Apache or Nginx, often showing significant speed advantages in performance tests. You’ll get Drupal running on your Ubuntu machine, ready for your next web project.

⚡ 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 is the first step to running Drupal, and it requires setting up the web server, the latest PHP, and the MariaDB database.

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 setting up OpenLiteSpeed, you’ll need to download the latest Drupal package and move its files to the correct directory for your web server.

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

Drupal needs a database to store all its content, so the next step is to create a new database and a user for it on your Ubuntu system.

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 make OpenLiteSpeed work with Drupal, you need to log into its admin panel and change the Document Root setting to point to your Drupal installation folder.

🐘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

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

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 post showed you how to install Drupal 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.

📚 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 Drupal with Nginx and Cloudflare on Ubuntu
CMS How to Install Drupal with Nginx and Cloudflare on Ubuntu

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 *