9 C
Texas
angeloma
Senior Writer and partner

How to install WordPress with OpenLiteSpeed on CentOS 8?

Hello, friends. In this post, you will learn how to install WordPress with OpenLiteSpeed on CentOS 8

This post is a continuation of our post

How to install OpenLiteSpeed on CentOS 8?

So before you do the tutorial, you should review the other one.

Install WordPress with OpenLiteSpeed on CentOS 8?

- Advertisement -

As we have already said, the first thing is to install and configure OpenLiteSpeed on CentOS 8. But also, to install some additional modules and packages.

dnf install lsphp74-common lsphp74-curl lsphp74-imap lsphp74-json lsphp74-mysqlnd lsphp74-opcache lsphp74-imagick lsphp74-memcached lsphp74-redis tar

With this, we can start working.

1.- Creating the new database for WordPress

WordPress handles a lot of data and all of it is stored in a database manager. As we already have MariaDB then this is the one we will use.

So, open the MariaDB shell:

mysql -u root -p

And it starts to create the new database, the user, and assign the corresponding permissions:

CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES on wordpress.* TO 'wordpress_user'@'localhost' IDENTIFIED BY 'wordpress_pss123';
FLUSH PRIVILEGES;
EXIT;

Of course, replace the user, password, and database name values with the ones you want.

2.- Download WordPress on CentOS 8

The next step is to download WordPress. To do this, we will place ourselves in the default OpenLiteSpeed DocumentRoot.

cd /usr/local/lsws/Example/html/

And from there we will make the download using the wget command.

wget https://wordpress.org/latest.tar.gz

Then decompress the downloaded file:

tar xvfz latest.tar.gz

And assign the corresponding permissions:

chmod -R 640 /usr/local/lsws/Example/html/wordpress/

Also, it changes the owner of it for the regular user, in my case:

chown -R angelo:angelo /usr/local/lsws/Example/html/wordpress/

Now, to configure OpenLiteSpeed.

3.- Configuring OpenLiteSpeed

Now you have to do some configuration to OpenLiteSpeed from the web interface of the program.

So, in a web browser, go to http://your-server:7080 to see the OpenLiteSpeed login screen. Enter your credentials and then you will see the dashboard.

Then, go to the Virtualhost section where you will see a summary of active Virutalhost.

1.- Virtualhost section on OpenLiteSpeed
1.- Virtualhost section on OpenLiteSpeed

Click on the glass button to see the Virtualhost data called Example.

2.- Virtualhost values
2.- Virtualhost values

Go to the General tab to see Virtualhost settings.

3.- General values of the Virtualhost
3.- General values of the Virtualhost

In the General section, click the modify button on the right.

And modify:

Document Root
Domain Name

It looks like this. Then click on the button on the floppy disk that saves the changes made.

4.- Modifying the Virtualhost values
4.- Modifying the Virtualhost values

Then, back to the VirtualHost settings, in the Index File section click on the modify button

5.- Index file section
5.- Index file section

And in the Index Files section he adds:

index.php

The following is the way it works

6.- Adding the index.php files to the index section
6.- Adding the index.php files to the index section

Now save the changes on the Diskette button.

Then click on the Rewrite tab.

7.- Enable the Rewrite module
7.- Enable the Rewrite module

In the Rewrite Control section click the modify button on the right and enable the Rewrite module and Autoload .htaccess

8.- Configuring OpenLiteSpeed
8.- Configuring OpenLiteSpeed

Then save the changes.

Finally, restart OpenLiteSpeed in the green button.

9.- Restart OpenLiteSpeed on CentOS 8
9.- Restart OpenLiteSpeed on CentOS 8

4.- Install WordPress with OpenLiteSpeed

Now you can install WordPress with OpenLiteSpeed without any problem.

So, in the browser go to your server and you will see the WordPress welcome screen.

10.-Install WordPress with OpenLiteSpeed on CentOS 8
10.-Install WordPress with OpenLiteSpeed on CentOS 8

In the next screen, add the configuration data from the database we created earlier.

11.- Configuring the WordPress Database
11.- Configuring the WordPress Database

If the connection to the database is successful, you will see this screen, and to start the installation just click on the Run the Installation button.

12.- Installing WordPress iwth OpenLiteSpeed on CentOS 8
12.- Installing WordPress iwth OpenLiteSpeed on CentOS 8

You will then have to add the information of the site you are creating, as well as the administrator account and password.

13.- Creating the site info on WordPress
13.- Creating the site info on WordPress

If everything goes well, you will see the following screen:

14.- WordPress with OpenLiteSpeed installed
14.- WordPress with OpenLiteSpeed installed

You can then login and access the Dashboard.

15.- WordPress dashboard
15.- WordPress dashboard

So, enjoy it.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article