How to Install WordPress on AlmaLinux 8 | Rocky Linux 8

In this tutorial, we’re offering the steps to set up WordPress with Apache internet server on ALamLinux or Rocky Linux 8 operating VPS, Cloud Hosting, or native Server utilizing the command line. 

WordPress doesn’t want any introduction whosoever is in running a blog or internet improvement would already learn about this opens supply content material administration system. Millions of internet sites are presently operating on it with the assistance of Apache-webserver. And when you’ve got just lately bought some cloud or digital non-public internet hosting server the place you might be operating Alamlinux or Rocky Linux 8 and need to set up your WordPress together with LAMP (Linux, Apache, MySQL, PHP) stack then listed below are the steps to comply with.

Note: We suggest utilizing any Web internet hosting management panel to set up and handle WordPress resembling Cpanel or any open supply, right here is the record of best open source hosting control panels.

 

(*8*)Steps to set up WordPress on Rocky Linux 8 | AlmaLinux 8

The person can comply with the given steps for CentOS 8 as nicely nonetheless because it has not been an LTS supported model anymore, therefore, you need to go for Alma, Rocky or another Long time period supported Linux.

Update DNF repository cache

Run the system replace command that can refresh the system repository cache to construct a brand new one with an up to date record of packages accessible for set up from the system repositories.

sudo dnf replace

Also, set up:

sudo dnf set up wget nano -y

 

Install Apache HTTPd on Almalinux or Rocky linux 8

To serve WordPress webpages over a neighborhood or web community utilizing a browser we’d like an internet server. And right here we’re going to set up a preferred Apache webserver.

sudo dnf set up httpd -y

Start and allow Apache system service

sudo systemctl allow --now httpd

Check it:

systemctl standing httpd

Enable Rewrite module:

sudo nano /and so on/httpd/conf/httpd.conf

At the top of the file add this line:

LoadModule rewrite_module modules/mod_rewrite.so

Save it utilizing Ctrl+O, hit the Enter key, after which Ctrl+X to exit.

 

Install MariaDB and PHP 8.0

The subsequent factor we’d like is the MySQL or MariaDB database to retailer knowledge and PHP language on our AlmaLinux or Rocky 8 as a result of WordPress has been written in PHP.

For MariaDB:

sudo dnf set up mariadb

Start and allow its service

sudo systemctl allow --now mariadb

Check it:

systemctl standing mariadb

Secure your Database set up

sudo mysql_secure_installation

Go by means of the guided text-based wizard to safe the MariaDB/MySQL

 

For PHP 8.0  and its extensions

By default, the PHP 7.2 model is accessible to set up from the App stream repository of Almalinux or Rocky however WordPress wants PHP 7.4 or above therefore we’ll go for the most recent model i.e PHP 8.0

For PHP 8.0 we want to allow the REMI repository.

sudo dnf set up -y https://rpms.remirepo.web/enterprise/remi-release-8.rpm
sudo dnf replace -y
sudo dnf module reset php -y
sudo dnf module allow php:remi-8.0 -y
sudo dnf replace -y
sudo dnf set up php php-{bz2,mysqli,curl,gd,intl,frequent,mbstring,xml}

 

Restart Apache server

Once PHP and its extensions are put in restart the Apache server to combine it correctly.

sudo systemctl restart httpd

 

Create Database

WordPress shouldn’t be going to retailer all the information generated by the person resembling webpage, person password, Plugin’s knowledge, and others on the native storage within the plain format. It required a Database server both domestically put in or on some distant server to effectively hyperlink all the information to serve them at any time when required. Here we have already got put in MariaDB. So, let’s create a devoted Database and person to use in WordPress.

sudo mysql
CREATE DATABASE yourdb;
CREATE USER 'person'@localhost IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON yourdb.* TO 'person'@localhost IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit;

Note: Replace yourdb, person, and password with no matter you need to set.

 

Download WordPress on Almalinux | Rocky Linux 8

WordPress shouldn’t be accessible by means of the default repository. Hence, we now have to obtain its recordsdata from its official web site to set up and configure this CMS manually.

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

Extract the file:

tar -xzvf newest.tar.gz

Move it to the Webroot listing.

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

Assing Apache person learn and write permission to the moved folder.

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

Some time Selinux could create some permission difficulty therefore run;

chcon -t httpd_sys_rw_content_t /var/www/html/ -R

To apply the change ins Selinux correctly, run

sudo restorecon -Rv /var/www/html/ 

Open ports within the firewall:

If you might be utilizing cloud internet hosting then open the ports in its firewall as an alternative of OS.

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo systemctl reload firewalld

Configure and Install WordPress on Rocky or AlmaLinux 8

Finally, go to your internet browser and enter a website identify resembling http://instance.com or http://server-ip- deal with of the server the place you’ve got put in the WordPress.

Hit the Let’s Go button.

Run the WordPress instalaltion on AlamLinux

Add the Database particulars you’ve got created. Hit the Submit button.

Add Database details for WordPress

Run Installation

After that hit the “Run Installation” button and create Username and Password. Create website

Wordpresss installation on Rocky Linux or AlmaLinux 8

 

 

https://www.how2shout.com/linux/how-to-install-wordpress-on-almalinux-8-rocky-linux-8/

Related Posts