Install and Configure WordPress on AlmaLinux 8

In this guide, we intend to show you how to Install and Configure WordPress on AlmaLinux 8.

WordPress is an open-source content management system licensed under GPLv2, which means that anyone can use or modify the WordPress software for free. A content management system is basically a tool that makes it easy to manage important aspects of your website – like content – without needing to know anything about programming.

The end result is that WordPress makes building a website accessible to anyone – even people who aren’t developers.

Install and Configure WordPress on AlmaLinux 8

Before you start to install WordPress on AlmaLinux 8, you need to log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our article the Initial Server Setup with AlmaLinux 8.

Also, you need to have the LAMP Stack installed on your server. To do this, you can follow our article How To Install LAMP Stack on AlmaLinux 8.

Now follow the steps below to complete this guide.

Install Additional PHP Extensions

Here we assumed that you are done with the requirements. First, you need to install the additional PHP extensions on AlmaLinux 8:

sudo dnf install php-{bz2,mysqli,curl,gd,intl,common,mbstring,xml}

then, restart Apache to apply the changes:

sudo systemctl restart httpd

Create a WordPress Database on AlmaLinux 8

At this point, you need to create a user and database for your WordPress. To do this, log in to your MariaDB Shell with the command below:

sudo mysql -u root -p

From your MariaDB shell, run the following command to create a WordPress database, here we named it wordpressdb:

MariaDB [(none)]> CREATE DATABASE wordpressdb;

Next, use the command below to create a WordPress user and grant all privileges to it on AlmaLinux 8, here we named it wordpress_user and set a strong password for it:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON wordpressdb.* TO 'wordpress_user'@'localhost' IDENTIFIED BY 'password';

Flush the privileges and exit from your MariaDB shell:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Set up WordPress on AlmaLinux 8

At this point, you can download the latest tar.gz package of WordPress on AlmaLinux 8 with the following command:

wget http://WordPress.org/latest.tar.gz

When your download is completed, extract your file:

tar -xzvf latest.tar.gz

Then, you need to move it to the webroot directory with the following command:

sudo mv wordpress/* /var/www/html/

Set the correct permissions for it:

sudo chown -R apache:apache /var/www/html/

Now open the ports 80 and 443 through the AlmaLinux 8 firewall with the following commands:

# sudo firewall-cmd --permanent --zone=public --add-service=http
# sudo firewall-cmd --permanent --zone=public --add-service=https

Reload the firewall to apply the new rules:

sudo systemctl reload firewalld

At this point, you can continue your WordPress installation and configure it on AlmaLinux 8 through the Web interface.

Access WordPress Web Interface

From here you can easily configure your WordPress through the web interface by  typing your server’s IP address in your web browser:

http://server-ip-address

You will see the WordPress Language screen. Select your desired language and press Continue.

Select WordPress language

Then, you will see the Welcome WordPress screen. Read the contents and click Let’s Go.

After that, you need to enter the WordPress database information that you have created on AlmaLinux 8 and click submit.

Enter WordPress database info

Next, click Run the Installation and provide the information that is needed, and click Install WordPress.

Install WordPress

Then, you will see the WordPress Login screen. Enter your username and password that you have generated in the previous step and click Sign-in.

Now you will see your WordPress dashboard.

WordPress dashboard on AlmaLinux 8

Conclusion

At this point, you learn to Install and Configure WordPress on AlmaLinux 8.

Hope you enjoy it.

May you will be interested in these articles too:

How To Set up WordPress on Centos 7

How To Set up WordPress on Debian 11

Set up WordPress on DirectAdmin

Install WordPress on cPanel

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!