Hola. Back again to my testing lab 🙂
Today i want to continue again my lab testing and continue what i already did it on 2 things on my VM Linux Ubuntu 18.04.
If you checked on my previous blogs, i already did 2 testing inside this Virtual Machine.
On Nginx Web Server previously, i already created a simple demo site using port 2100 and now i am gonna use that port again to install WordPress and after all the installation done it will like picture this below :
Here are the following steps :
sudo apt update sudo apt-get upgrade
The first command will update the list of available packages and their versions and the second one will actually install the newer versions of the packages that you have.
2. Reinstall the PHP
Previously, i already installed the PHP component, but to make sure i try to reinstall again
apt-get install php7.2 php7.2-cli php7.2-fpm php7.2-mysql php7.2-json php7.2-opcache php7.2-mbstring php7.2-xml php7.2-gd php7.2-curl
Change Listen to Listen 127.0.0.1:9000 to make PHP-FPM listen on the localhost network. For security, we can use the listen.allowed_clients rather than set the owner/group of the socket.
sudo nano /etc/php/7.3/fpm/pool.d/www.conf
3. Create WordPress database
$ mysql -u root -p Enter password: MariaDB [mysql]> CREATE DATABASE wordpress_db; MariaDB [mysql]> GRANT ALL ON wordpress_db.* TO 'wpuser'@'localhost' IDENTIFIED BY 'Passw0rd!' WITH GRANT OPTION; MariaDB [mysql]> FLUSH PRIVILEGES; MariaDB [mysql]> exit
4. Download WordPress and configure
cd /var/www/html_2100/html wget https://wordpress.org/latest.tar.gz tar -zxvf latest.tar.gz mv wordpress/* . rm -rf wordpress
Change the ownership and apply correct permissions to the extracted WordPress files and folders. To do that, use the following command from the terminal.
cd /var/www/html_2100/html/wordpress/ chown -R www-data:www-data * chmod -R 755 *
5. Configure Server Block
Previously we already created this Server Block, now we update again for the WordPress
sudo nano /etc/nginx/sites-available/html_2100
then restart the nginx
sudo systemctl restart nginx
Open site http://localhost:2100 and follow all the WordPress wizard installation. Then your are done completed to install WordPress on top Nginx and MariabDB database.