Next we shall install PHP and MariaDB for our OpenLiteSpeed web server, these two will be needed for our WordPress website. MariaDB is one of the most popular MySQL database servers in the world, it's also open source and everyone loves that. PHP is a general purpose scripting language that is heavily used for web development. These two will be needed for creating databases for WordPress and more.
sudo apt-get install mariadb-server mariadb-client
And just like last time, we're also going to want to start the service, using systemctl
.
sudo systemctl start mariadb.service
sudo systemctl status mariadb.service
Next step is to secure MariaDB
mysql_secure_installation
# Secure Installation
Set root password? [Y/n] n
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y
Step 2. Installing PHP
Now if we head over to https://IP:7080/login.php, login using the credentials OpenLiteSpeed generated for us from the last post.Web Admin user/password is admin/NmQ0ODli
Once logged into the dashboard. Head on over to Tools → Compile PHP
, then select version 8.0.11.
Now the last step, but before we start it, we need to open a new terminal and type the following command for it to run.
sudo /usr/local/lsws/phpbuild/buildphp_manual_run.sh
Then it should look something like this once it's finished.
To verify that PHP is up and running, type the following URL into the web browser. http://IP:8088/phpinfo.php
Voilà! Now PHP and MariaDB are both installed and will be used for WordPress later down the line.
Thanks for reading!
Kenji
Top comments (0)