22 C
Texas
angeloma
Senior Writer and partner

Install WordPress (with Nginx) on CentOS 8 / RHEL 8 / Oracle Linux 8

Almost everyone knows that WordPress is the most popular CMS in the world. And nothing better than having it installed on our personal server to deploy websites quickly. If in addition to this, we add Nginx as a web server then we would have a website quite fast and with great performance. Therefore, in this post, I will show you how to install WordPress on CentOS, RHEL and Oracle Linux 8 using Nginx.

There are companies today that create websites only available from the business network. Many with the purpose of communicating with workers, or making available resources of the company. At least, in my environment, there are several companies that do it. And they use WordPress to deploy them. So, the utility of having it installed is maximum.

On the other hand, we may want a personal blog on our own server. Either in the cloud or we have the computer physically.

In any case, WordPress which is a CMS is a software that allows you to make websites or blogs quickly and easily. It also manages the publication and realization of page entries. The ability to customize is quite extensive and almost everything can be done without advanced knowledge of HTML or CSS. In fact, most websites are designed with WordPress. This is where their potential lies.

- Advertisement -

So, let us install WordPress on CentOS, RHEL and Oracle Linux 8.

1) Install LEMP on CentOS, RHEL and Oracle Linux 8

In order to install WordPress, it is first necessary to have a ready and functional web server. In this case, we have opted for Nginx so we will have to have a LEMP server.

But it is not a problem, because we have done a complete tutorial to install LEMP on CentOS, RHEL and Oracle Linux 8.

Read How to install LEMP on CentOS 8, RHEL 8 and Oracle Linux 8?

You just have to pay attention to have these PHP modules installed

:~# dnf install php php-fpm php-common php-mysqlnd php-gd php-xml php-mbstring php-xml

Once you have the LEMP server up and running, move on.

2) Create a new database user for WordPress

WordPress requires a database manager to store everything that is happening on the site. But not only that but other things more.

For security reasons, it is advisable to create a new user and database dedicated to WordPress. Then, go to the MariaDB console and type.

:~# mysql -u root -p
> CREATE DATABASE wordpressdb;
> GRANT ALL PRIVILEGES ON wordpressdb.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'wordpresspss';
> FLUSH PRIVILEGES;
> exit;

1.- Creating the new user for WordPress
1.- Creating the new user for WordPress

Of course, you can define the names you want.

3) Install WordPress on CentOS, RHEL and Oracle Linux (I)

Now we can install WordPress on CentOS / RHEL / Oracle Linux 8. To do this, first, you have to download it using wget. If you do not have it installed, you have to do it first.

:~# cd /tmp/
:~# wget -c https://wordpress.org/latest.tar.gz

2.- Downloading WordPress
2.- Downloading WordPress

Next, decompress the file.

:~# tar -xvzf latest.tar.gz

Now, you have to move the generated folder to /usr/share/nginx/html/. Then, set the right permissions to the folder.

:~# mv wordpress/ /usr/share/nginx/html/
:~# chown -R nginx:nginx /usr/share/nginx/html/
:~# chmod 755 -R /usr/share/nginx/html/

Then, restart Nginx.

:~# systemctl restart nginx

4) Install WordPress on CentOS, RHEL, Oracle Linux 8 (II)

Now, open your browser and go your server and complete the installation.

5.- Welcome screen
5.- Welcome screen

Now, type your DB credentials.

6.- DB credentials to install WordPress on CentOS, RHEL and Oracle Linux 8
6.- DB credentials to install WordPress on CentOS, RHEL and Oracle Linux 8

Now, we can start the installation.

7.- Start to install WordPress on Centos, RHEL and Oracle Linux 8
7.- Start to install WordPress on Centos, RHEL and Oracle Linux 8

Then, type the site information.

8.- Site information
8.- Site information

If everything went well, you will see the following screen.

9.- WordPress is installed
9.- WordPress is installed

Now, you can log in to admin your WordPress instance.

10.- WordPress Log in
10.- WordPress Login

Then, you will see the WordPress dashboard.

11.- WordPress Dashboard
11.- WordPress Dashboard

And that’s it.

Conclusion

In this post, you learned how to install WordPress on CentOS, RHEL and Oracle Linux 8. This way you can deploy quality websites using a reliable web server like Nginx on a robust operating system like those of the Red Hat family. As you can see, the installation is not complicated.

Please share this post and join our Telegram channel.

- 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