---
title: Installing OpenLiteSpeed with WordPress on Ubuntu or Debian Linux
description: Learn how to install and configure the powerful OpenLiteSpeed web server on Ubuntu or Debian Linux. This comprehensive guide provides step-by-step instructions to help you get started quickly and efficiently.
products:
  - instances
tags: OpenLiteSpeed Wordpress Ubuntu Bionic-Beaver php
dates:
  validation: 2025-07-16
  posted: 2019-08-07
  validation_frequency: 12
difficulty: beginner
usecase:
  - application-hosting
ecosystem:
  - third-party
---
import image from './assets/scaleway-ols_demo.webp'
import image2 from './assets/scaleway-ols_login.webp'
import image3 from './assets/scaleway-ols_dashboard.webp'
import image4 from './assets/scaleway-ols_vh.webp'
import image5 from './assets/scaleway-ols_vh_conf.webp'
import image6 from './assets/scaleway-ols_vh_docroot.webp'
import image7 from './assets/scaleway-ols_vh_rewrite.webp'
import image8 from './assets/scaleway-ols_listener.webp'
import image9 from './assets/scaleway-ols_listener_web.webp'
import image10 from './assets/scaleway-ols_listener_add_vh.webp'
import image11 from './assets/scaleway-ols_listener_vhmapping.webp'
import image12 from './assets/scaleway-ols_graceful_restart.webp'
import image13 from './assets/scaleway-ols_wp_lang.webp'
import image14 from './assets/scaleway-ols_wp_lang.webp'
import image15 from './assets/scaleway-ols_wordpress_install.webp'
import image16 from './assets/scaleway-ols_wordpress_dashboard.webp'

import Requirements from '@macros/iam/requirements.mdx'


OpenLiteSpeed combines speed, security, scalability, optimization, and simplicity in one friendly open-source package. The source code of the project is released under the GPLv3 license and available publicly on [GitHub](https://github.com/litespeedtech/openlitespeed).

The application provides a web-based administration interface, compatibility with Apache rewrite rules, as well as customized [PHP](https://php.net) processing for improved performance.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- An [SSH key](/organizations-and-projects/how-to/create-ssh-key/)
- An [Instance](/instances/how-to/create-an-instance/) running on Ubuntu or Debian Linux
- A domain name configured and pointed to your Instance
- `sudo` privileges or access to the root user

## Installing OpenLiteSpeed and PHP8.1

1. Start with installing the OpenLiteSpeed repository:
    ```
    wget -O - https://repo.litespeed.sh | sudo bash
    ```
    <Message type="tip">
      The command above works with Debian and Ubuntu.
    </Message>
2. Update the package cache and install OpenLiteSpeed via `apt`.
    ```
    apt update && apt install openlitespeed
    ```
3. Install PHP8.1 from the repository using `apt`.
    ```
    apt install lsphp81 lsphp81-common lsphp81-curl lsphp81-mysql lsphp81-opcache lsphp81-imap lsphp81-opcache
    ```

### Setting up MariaDB

1. Start by installing the [MariaDB](https://mariadb.org/) database server via `apt`.
    ```
    apt install mariadb-server -y
    ```
2. Run the [setup utility](/tutorials/mariadb-ubuntu-bionic/#securing-mariadb) to configure the MariaDB server and set a password for its root user.
    ```
    mysql_secure_installation
    ```
3. Connect to MariaDB as `root` user with the password configured in the previous step.
    ```
    mysql -u root -p
    ```

    The MariaDB shell displays.

    ```
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 49
    Server version: 10.1.40-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>
    ```
4. Create an SQL database for WordPress and grant it the required permissions.
    ```
    CREATE DATABASE wordpress;
    GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost IDENTIFIED BY '<a_secure_password>';
    ```
5. Leave the MariaDB shell.
    ```
    exit;
    ```

### Testing the OpenLiteSpeed installation

1. Start OpenLiteSpeed by running the following command:
    ```
    systemctl start lsws
    ```
2. A test site is running at `http://instance_ip:8088`. Open the test site in your browser. You can run different demo applications like a [CGI-script](https://en.wikipedia.org/wiki/Common_Gateway_Interface), a check of the installed PHP version, password authentication, file upload, and so on.
    <Lightbox image={image} alt="" />

### Accessing the OpenLiteSpeed administration interface

Open the administration interface in your web browser at `https://instance_ip:7080`.

<Lightbox image={image2} alt="" />

Log in using the following credentials:

- Username: `admin`
- Password: A randomly generated password is stored in the `/usr/local/lsws/adminpasswd` file.

<Message type="important">
  For security reasons, it is recommended to change the admin password by running the following script: `/usr/local/lsws/admin/misc/admpass.sh`;
</Message>

The administration interface displays.

<Lightbox image={image3} alt="" />

The status of OpenLiteSpeed is visible in the interface and you can configure additional settings.

### Creating a virtual host in OpenLiteSpeed

1. Enter the OpenLiteSpeed directory.
    ```
    cd /usr/local/lsws
    ```
2. Create a directory structure for the new virtual host. You can name it as you want. In this example, it is called `wordpress.example.com`:
    ```
    mkdir wordpress.example.com
    mkdir wordpress.example.com/html
    ```
3. Open the OpenLiteSpeed configuration assistant in a web browser and click **Virtual Hosts** to enter the virtual host configuration. The virtual host list displays.
4. Click **+** to create a new virtual host.
5. Enter the details of the virtual host and click the disk icon:
    <Lightbox image={image4} alt="" />

    - **Virtual Host Name**: A unique identifier for the virtual host, i.e. `WordPress`
    - **Virtual Host Root**: The root directory of the virtual host, i.e. `$SERVER_ROOT/wordpress.example.com`
    - **Config File**: The path to the configuration file of the virtual host, i.e. `$SERVER_ROOT/conf/vhosts/wordpress.example.com/vhconf.conf`
6. Click **Click to create** to let OpenLiteSpeed automatically generate a configuration file. As the configuration file is not yet created, OpenLiteSpeed proposes to create a new one. Click the disk icon to save.
    <Lightbox image={image5} alt="" />
7. Go back to the virtual host configuration and click the **General** tab to configure the **Document Root** for the virtual host. Click the disk icon to save the configuration once set:
    <Lightbox image={image6} alt="" />
8. Click the **Rewrite** tab in the virtual host configuration. Then activate the **Enable Rewrite** and **Auto Load from .htaccess** options and save the configuration:
    <Lightbox image={image7} alt="" />

### Creating a listener in OpenLiteSpeed

A listener defines the port on which the application launches. To make WordPress available on the standard HTTP port (_Port 80_), a new listener has to be configured in OpenLiteSpeed.

1. Enter the **Listeners** section of the administration panel, then click **+** to configure a new listener:
    <Lightbox image={image8} alt="" />
2. Enter the details of the new listener:
    <Lightbox image={image9} alt="" />

    - **Name**: A name for the listener, i.e. `Web`
    - **IP Address**: Define an IP address to listen on, or select `ANY` to listen on all IP addresses configured on the instance.
    - **Port**: Set the port to listen on, i.e. `80` to listen on the standard HTTP port
    - **Binding**: Choose the OpenLiteSpeed child processes to bind the listener on. Leave the default value to bind the listener to all processes.
    - **Secure**: Select if a secured connection shall be used. A TLS/SSL certificate is required for a secure connection. Set the value to `No` to use plain HTTP.
    - **Notes**: This field can be used to add notes to a listener.

  Once all values are set, save the configuration by clicking on the disk icon.
3. Map the listener to a virtual host and set the domain name by clicking on **+** in the **Virtual Host Mappings** section:
    <Lightbox image={image10} alt="" />
4. Choose the Virtual Host from the drop-down list (i.e. `WordPress`) and enter the domain name to use for the virtual host. Once set, click the disk icon to save the configuration:
    <Lightbox image={image11} alt="" />
5. Launch a graceful restart of OpenLiteSpeed by clicking on the logo, then on the corresponding button:
    <Lightbox image={image12} alt="" />

## Downloading and installing WordPress

1. Enter the web directory of the virtual host:
    ```
    cd /usr/local/lsws/wordpress.example.com/html
    ```
2. Download and unpack the latest WordPress release:
    ```
    wget http://wordpress.org/latest.tar.gz
    tar xvzf latest.tar.gz
    ```
3. Set the ownership of the WordPress folder and the files within it to the user `nobody` and the group `nogroup`. This is required so that OpenLiteSpeed can modify files within this folder:
    ```
    chown -R nobody:nogroup wordpress
    ```
4. Open a web browser and go to `http://instance_ip/wordpress`. The WordPress installer displays. Choose the language for your blog and click **Continue**. WordPress displays some information about the tasks that will be performed by the automatic installer.
    <Lightbox image={image13} alt="" />
5. Click **Let's Go** to move forward.4. Open a web browser and go to `http://instance_ip/wordpress`. The WordPress installer displays. Choose the language for your blog and click **Continue**. WordPress displays some information about the tasks that will be performed by the automatic installer.
    <Lightbox image={image14} alt="" />
6. Click **Let's Go** to move forward.
7. Enter the details of your blog and click **Install WordPress** to launch the installation:
    <Lightbox image={image15} alt="" />
8. Log in to WordPress to begin writing your blog:
    <Lightbox image={image16} alt="" />

You now have successfully configured a basic setup of OpenLiteSpeed and installed a WordPress blog on it. For more information about OpenLiteSpeed, refer to the [official documentation](https://docs.openlitespeed.org/).