1 C
Texas
angeloma
Senior Writer and partner

How to install WordPress 5.4 on Ubuntu 18.04 LTS?

Nowadays many people decide to create a blog to write about many topics. Some of these blogs are about technology or other topics. In this sense, WordPress is a very popular application for the creation of blogs. Therefore, this article is about how to install WordPress 5.6 on Ubuntu 18.04 LTS.

For the creation of blogs there are several alternatives such as Blogger, however, it is not reckless to say that WordPress is the most popular and robust solution in its field.

This is because in WordPress you don’t need programming skills to build your website. On the other hand, it is open source which guarantees its growth and community support. It is also quite customizable and has extensive technical support.

In addition to WordPress, the creators of Blog choose Ubuntu 18.04 LTS to install all its content there, because it is a new and robust version of the most popular distribution in the world.

- Advertisement -

Let’s install WordPress 5.6 on Ubuntu 18.04 LTS.

1. Upgrade the system

Before you start installing WordPress you must make sure that the system is up to date. With this you will have the latest security patches and the system will be more reliable and stable. To do this, run the following command.

:~$ sudo apt update && sudo apt upgrade

1.- Upgrade the system
1.- Upgrade the system

It is always advisable to do this periodically.

2. Install Apache web server

WordPress itself is a web application. Therefore, you need a web server that allows its execution. There are several very good ones like Ngnix or Apache web server. I will use the last one.

:~$ sudo apt install apache2

2.- Installing apache web server
2.- Installing the apache web server

Now, enable and start the Apache web server service.

:~$ sudo systemctl enable apache2
:~$ sudo systemctl start apache2

3.- Enabling the apache service
3.- Enabling the apache service

The goal of this is to make apache boot when the system boots.

Now, open your web browser and go to http://IP_SERVER

4.- Apache web srever default page
4.- Apache web server default page

If you see the image above, apache is correctly installed.

3. Install PHP

In this step, you have to install PHP. This in order to be able to run WordPress properly. In addition to the language, it is necessary to install some additional modules.

:~$ sudo apt install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-mbstring php7.2-xmlrpc php7.2-soap php7.2-gd php7.2-xml php7.2-intl php7.2-mysql php7.2-cli php7.2 php7.2-ldap php7.2-zip php7.2-curl

5.- Installing PHP
5.- Installing PHP

Now it’s time to check that PHP is working.

Create a file called test.php on /var/www/html/ directory.

:~$ sudo nano /var/www/html/test.php

And add the following:

<?php
echo "PHP is working";
?>

6.- PHP test file
6.- PHP test file

Next, open the file through the web browser http://IP_SERVER/test.php

7.- PHP is working
7.- PHP is working

Finally, PHP is working fine.

4. Install MariaDB

WordPress requires for its operation the installation and configuration of a database manager application.

MariaDB is a great alternative for this since it is free and above all stable. It is also compatible with MySQL as it is a fork of MySQL.

:~$ sudo apt install mariadb-server

8.- Installing MariaDB
8.- Installing MariaDB

Then, enable the service and start the service.

:~$ sudo systemctl enable mariadb
:~$ sudo systemctl start mariadb

9.- Enabling MariaDB service
9.- Enabling MariaDB service

Now, you need to configure a root key for MariaDB. You can also configure other things there. To do this, run the mysql_secure_installation script.

:~$ sudo mysql_secure_installation

10.- Using the mysql_secure_installation script
10.- Using the mysql_secure_installation script

11.- Using the mysql_secure_installation script to configure MariaDB
11.- Using the mysql_secure_installation script to configure MariaDB

As you can see, I said Y, N, Y, Y to the questions.

Once MariaDB is correctly installed and configured, it is necessary to create the database and the WordPress user.

:~$ sudo mysql -u root -p
CREATE DATABASE wordpress;
USE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'wordpresspss';
FLUSH PRIVILEGES;
exit;

12.- Creating the database for wordpress
12.- Creating the database for WordPress

Now, you can install WordPress.

5. Install WordPress

The time has come to install WordPress. First, download it.

:~$ cd /tmp
:~$ wget https://wordpress.org/latest.tar.gz

13.- Download and install WordPress
13.- Download and install WordPress

Now, decompress the file.

:~$ tar -xvzf latest.tar.gz

14.- Decompressing the file
14.- Decompressing the file

Then move the folder to /var/www/html. Next, change the folder owner and assign permissions.

:~$ sudo mv wordpress/ /var/www/html/
:~$ sudo chown -R www-data:www-data /var/www/html/wordpress/
:~$ sudo chmod 755 -R /var/www/html/wordpress/

Now, you can complete the installation from the web interface.

6. Completing the installation

Now, through the web interface, it is necessary to complete the installation. Go to http://IP_SERVER/wordpress and you will see the following.

15.- WordPress Installation
15.- WordPress Installation

In the next step, you will have to enter the information corresponding to the database.

16.- Adding some information to installer
16.- Adding some information to the installer

Then you can continue with the installation.

17.- Continuing the installation
17.- Continuing the installation

Then, enter the information from your website or blog that you want to create. You also have to create the username and the password.

18.- Add your website information
18.- Add your website information

When you continue, you will get the screen to log in, with the admin user and the password you defined.

19.- WordPress login
19.- WordPress login

And finally, you will see the WordPress dashboard.

20.- WordPress dashboard
20.- WordPress dashboard

And that’s it. If you scroll down, you will see the current version.

21.- WordPress 5.4 installed
21.- WordPress 5.4 installed

Conclusion

If you want to create a blog or a personal web site, I think your first option to do so is WordPress, because its installation is not complicated, and because it is free. All this without losing robustness and power.

Please share this article with your friends.

- 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