Instructions for installing WordPress in OpenLiteSpeed ​​web server

Tutorials 0 lượt xem
This article is part 3 of 4 in the OpenLiteSpeed ​​User Guide series

Prepare

Before you start installing WordPress, you need to prepare the following:

  • The VPS server installs OpenLiteSpeed ​​and the necessary components like this tutorial on CentOS 7 .
  • Add website in OpenLiteSpeed ​​. After this step, you have pointed the domain to the IP of the VPS.
  • Connect to VPS using MobaXTerm with root user.

Note: You have the flexibility to change the parameters to suit your situation such as the database name.

How to Install WordPress in OpenLiteSpeed

Step 1: Create a database

Login to Maria DB with root user:

Create a wordpress database:

Create user:

Grant permissions to the user:

Step 2: Install WordPress:

Access the document root:

Download the latest version of WordPress:

Decompression:

Move out the html root folder and delete the empty wordpress folder:

Permissions for the folder

CentOS:

Ubuntu:

You can now install WordPress in your browser as usual.

Step 3: Configure WordPress to work with OpenLiteSpeed.

In this section we will configure OpenLiteSpeed ​​to use the cache module (OpenLiteSpeed ​​does not have the LSCache module like the Enterpise version but it also has a cache module with similar functionality), the .htaccess file, as well as using the LiteSpeed ​​Cache plugin

Configuring the cache module

In WebAdmin, go to  Server Configuration > Modules . Click the Add button

install WordPress in OpenLiteSpeed ​​5

The Module field you enter into cache .

In the Parameters module field, copy and paste the following information:

Click the Save button to save the configuration.

Configuration using file .htaccess

Go to Virtual Hosts. Click the View button for the Virtual Host you need to add Rewrite Rules:

install WordPress in OpenLiteSpeed ​​1

Switch to the Rewrite tab and then select Edit

install WordPress in OpenLiteSpeed ​​2

Select the Yes button and then click the Save button:

install WordPress in OpenLiteSpeed ​​3

Click Edit in the Rewrite Rules section and add:

install WordPress in OpenLiteSpeed ​​7

Click the Graceful Restart button.

Now you configure Permalink in WordPress to see if there are still 404 errors.

Install LiteSpeed ​​Cache

Install and activate LiteSpeed ​​Cache as usual:

By default LiteSpeed ​​Cache is active as soon as activation is complete.

To check if LiteSpeed ​​Cache is working do the following:

Now you open a browser without the webmaster login. Go to the website and open the Inspect tool.

If you see information like the one I circled in the image, LiteSpeed ​​Cache is working OK:

install WordPress in OpenLiteSpeed ​​8

Default Cache for 604800 seconds equivalent to 7 days. You can reset it in the configuration section of the LiteSpeed ​​Cache plugin.

At this point you have completed the installation of a WordPress website in OpenLiteSpeed.

You also learn how to configure the LiteSpeed ​​Cache plugin to work with OpenLiteSpeed.

Note : You should edit the php.ini configuration to avoid the file upload limit error in WordPress . Remember to restart OpenLiteSpeed ​​when finished editing the php.ini file.

Reference source
http://open.litespeedtech.com/mediawiki/index.php/Help:How_To_Set_Up_LSCache_For_WordPress

View articles in the series

Previous part: How to add website in OpenLiteSpeed ​​web server Next part: How to install and configure Let’s Encrypt in OpenLiteSpeed

Bài viết liên quan