In this walk-through we will install all the components needed to run WordPress on your own local or cloud Ubuntu 20.04 server. This video was done as a response to a direct request.
Installation of ubuntu server Raspberry Pi
The Base Install to run WordPress
ssh to the linux server you have provisioned. We used Ubuntu 20.04 for this walk-through.
We will install Apache, MariaDB, PhP7.4 and WordPress.
Install Apache Web Server
sudo apt-get update
sudo apt-get install apache2 apache2-utils
sudo systemctl enable apache2
sudo systemctl start apache2
Test apache works by navigating to your servers Ip with a web browser. You should see the below
Install MariaDB Database Server
sudo apt-get install mariadb-server mariadb-client
Set the root password for the Database Server
Enter current password for root (enter for none): (Press Enter)
Enter your new password and confirm
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
sudo apt-get install php7.4 php7.4-mysql php7.4-cli php7.4-cgi php7.4-gd libapache2-mod-php7.4
To test create a file called info.php
sudo vi /var/www/html/info.php
Add the following to the file:
Test php works by navigating to your servers Ip with a web browser. In our case it was http://220.127.116.11/info.php
You should see the below:
First we need to get the latest WordPress files.
sudo wget -c http://wordpress.org/latest.tar.gz
Extract the files
sudo tar -xzvf latest.tar.gz
Move the WordPress files to /var/www/html
sudo rsync -av wordpress/* /var/www/html/
Set file / directory permissions
sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R 755 /var/www/html/
Create the WordPress user and Database
login to the MariaBD server with the user root and the password you entered earlier.
mysql -u root -p
CREATE DATABASE wp_pos;
GRANT ALL PRIVILEGES ON wp_pos.* TO 'wpposuser'@'localhost' IDENTIFIED BY 'your_DB_password_here';
Update the WordPress config file with Database and user information needed.
Navigate to /var/www/html/
sudo cp wp-config-sample.php wp-config.php
Enter the relevant details as seen below:
We now need to rename the default Apache index file so the wordpress one is the active one.
mv index.html index.html.old
Restart apache and Database to ensure the new configs are being use.
sudo systemctl restart apache2.service
sudo systemctl restart mysql.service
Initial WordPress Install
Test WordPress is ready for initial install navigating to your servers Ip with a web browser. you should see the following:
If you see the page click on “Continue”. You should be presented with the page below. Complete the details and click “Install WordPress”
Once the installation is complete login with the credentials you have just provided.
If your login is successful. You will be presented with the screen shown below. Your WordPress site is now up and running!