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
So before you do the tutorial, you should review the other one.
Install WordPress with OpenLiteSpeed on CentOS 8?
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';
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.
And from there we will make the download using the wget command.
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.
Click on the glass button to see the Virtualhost data called Example.
Go to the General tab to see Virtualhost settings.
In the General section, click the modify button on the right.
It looks like this. Then click on the button on the floppy disk that saves the changes made.
Then, back to the VirtualHost settings, in the Index File section click on the modify button
And in the Index Files section he adds:
The following is the way it works
Now save the changes on the Diskette button.
Then click on the Rewrite tab.
In the Rewrite Control section click the modify button on the right and enable the Rewrite module and Autoload .htaccess
Then save the changes.
Finally, restart OpenLiteSpeed in the green button.
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.
In the next screen, add the configuration data from the database we created earlier.
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.
You will then have to add the information of the site you are creating, as well as the administrator account and password.
If everything goes well, you will see the following screen:
You can then login and access the Dashboard.
So, enjoy it.