Wordpress Installation

This guide will explain how to get up and running with Wordpress on LiteSpeed Web Server.

The easiest way to install PHP for LiteSpeed is through our CentOS repository. If the LiteSpeed Repository was not installed and enabled during the web server installation, follow this guide to install and enable the LiteSpeed Repository.

Step 1. Install PHP

You can install some of the most commonly-used PHP 7.1 packages and modules for LiteSpeed. Use the following command:

sudo yum install lsphp71 lsphp71-mysqlnd lsphp71-common lsphp71-gd lsphp71-pdo lsphp71-process lsphp71-mbstring lsphp71-mcrypt lsphp71-opcache lsphp71-bcmath lsphp71-xml lsphp71-soap lsphp71-json -y 

Step 2. Setup PHP

Visit http://your_server_IP:7080. Navigate to Server Configuration > External app, then click the second icon Edit on the right hand side in order to edit this application.

  • Name: lsphp → lsphp71
  • Command: $SERVER_ROOT/fcgi-bin/lsphp5 → $SERVER_ROOT/lsphp71/bin/lsphp

Step 3. Restart LSWS

When you are finished, click the Save icon to save your changes, then click the Graceful Restart button.

Step 4. PHP Verification

Visit http://your_server_IP/phpinfo.php and make sure PHP Version shows 7.1.x.

Install MariaDB:

sudo yum install mariadb-server
sudo systemctl start mariadb

Set new password:


Enter $yourpassword

Create the Wordpress database and your Wordpress user/password:

 mysql -u root -p$yourmysqlpassword
 create database wordpress; grant all privileges on wordpress.* to wordpress@localhost identified by 'wordpress'; exit;

Note: For security purposes, you should use a Wordpress username and password that are different than our example.

An index file needs to be set in the LiteSpeed Web Admin Console. Navigate to Virtual Hosts > Select Virtual Host from List > General > Index Files, click Edit in the top right corner, and enter index.html,index.php in the Index Files box.

To illustrate setting up Wordpress on a vhost we'll use the default virtual host, “Example”. You can download Wordpress from their official download page.

Please note that the document root of 'Example' virtual host is /usr/local/lsws/Example/http/

unzip latest.zip
mv wordpress/* .

Open the browser with URL http://server_IP:8088/

wp-config.php file

Once you open the url in browser you will see this window:

As you can see, WordPress will ask all database related information on next step and will create wp-config.php file using this information. If for some reasons (mostly permissions issues) WordPress is not able to create this file, it will provide you with data which you can copy and manually create wp-config.php file inside your WordPress home.

Database Details

We've created the database above. Just enter the database details and click 'Submit'. If the WordPress installer is successfully able to connect to the database, it will start the installation process.

Run WordPress Install

If everything works out great, just click 'Run the install' and WordPress will perform the installation.

Enter General Website details

WordPress will now ask you information regarding your blog/site, like whats the blog name, username you want to use and password, example configurations:

  • Site Title: litespeedtech
  • Username: litespeedtech
  • Password: litespeedtech
  • Your email: example@example.com

If you are satisfied with the details click 'Install WordPress'.

WordPress is now successfully installed, you can browse the home at http://server_IP:8088/ and wordpress admin at http://server_IP:8088/wp-admin

  • Admin
  • Last modified: 2017/09/08 05:20
  • by Usman Nasir