Skip to content
Follow
CMS

How to Install Drupal with OpenLiteSpeed on Ubuntu Linux

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

Installing Drupal (a free tool for building websites) with OpenLiteSpeed on Ubuntu Linux gives you a fast website setup that loads pages over 10 percent faster than standard Apache servers. OpenLiteSpeed is a lightweight web server that handles high visitor traffic with ease.

Advertisement

Getting this server setup running takes a few clear steps on your Ubuntu system. Follow the steps below to install both programs so your site runs at top speed.

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

Advertisement

How to install OpenLiteSpeed on Ubuntu Linux

To install OpenLiteSpeed on Ubuntu Linux for Drupal, you must set up the OpenLiteSpeed web server, install the latest version of PHP, and configure the MariaDB database server. These three components work together to provide the environment required to run your Drupal site smoothly on your Ubuntu server.

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.

Advertisement

How to download Drupal on Ubuntu Linux for OpenLiteSpeed

To download Drupal on Ubuntu Linux for OpenLiteSpeed, you use the terminal to fetch the latest archive file directly from the official Drupal website and extract it into your web server directory. This places the core website files in the correct location so OpenLiteSpeed can serve them to visitors.

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.

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.

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

To create a Drupal database on Ubuntu, you log into the MariaDB command line interface as the root user and run SQL commands to set up a dedicated database and user account. This database securely stores all your website content, user accounts, and configuration settings.

Advertisement

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

sudo mysql -u root -p

Then, create a database called drupaldb

CREATE DATABASE drupaldb;

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

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

Then, grant the user full access to the database.

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

Finally, save your changes and exit.

FLUSH PRIVILEGES;
EXIT;

How to configure OpenLiteSpeed to support Drupal

To configure OpenLiteSpeed to support Drupal, you log into the web server administration panel and update the Document Root setting to point directly to your extracted Drupal file folder. This tells the server where to find your website files when someone visits your domain name.

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.

Advertisement

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

$VH_ROOT/drupal/
Document root configuration for WordPress on OpenLiteSpeed
wordpress on openlitespeed document root
💡TipOn the same General tab, edit the Index Files section and replace index.html with index.php, as shown below.

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

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.

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

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.

http://localhost

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

Advertisement

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
⚠️WarningNext, 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.

Advertisement

📚 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
How to install Drupal with Apache support on Ubuntu 24.04
CMS How to install Drupal with Apache support 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 *