Skip to main content

How To Install WordPress On Rocky Linux 9

WordPress is widely recognized as the preferred platform for building websites and blogs due to its ease of use and wide range of customization features. Suppose you’re considering installing WordPress on Rocky Linux, an open-source operating system known for its reliability. In that case, you’ll find the process to be quite straightforward when coupled with the LAMP stack – Linux, Apache, MySQL, and PHP. In the following article, we will guide you through each step of setting up WordPress on Rocky Linux using LAMP, allowing you to get your website or blog up and running smoothly in no time. So, let’s dive into the process!

Install WordPress On Rocky Linux 9

Step 1: Update Your System in Rocky Linux

Before installing any new software, it’s a good practice to update your system’s package repository and install packages to the latest versions. Open a terminal and run the following command:

yum update 

Step 2: Installation process of LAMP

LAMP means Linux, Apache, MariaDB, and PHP. To run WordPress, we need a web server, a database server, and PHP. So, we’ll set up the Apache web server, the MariaDB database server, and PHP.

Install Apache in Rocky Linux 9

Run the following command to install Apache:

yum install httpd

Run the following commands to start, enable (to be able to start on the boot), and verify the status of the Apache service:

systemctl start httpd
systemctl enable httpd
systemctl status httpd


Install MariaDB in Rocky Linux 9

Install MariaDB, a MySQL-compatible database server:

yum install mariadb-server

Run the following commands to start, enable (to be able to start on the boot), and verify the status of the MariaDB service:

systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb

Securing MariaDB installation

mysql_secure_installation

Create or (press enter not to create) a password for the root user. If you press enter, you’ll be able to proceed with your existing root account password, so press “n” for authentication and not to change the root password queries:

PHP Installation in Rocky Linux 9

Install PHP and required PHP extensions:

yum install php php-mysqlnd php-gd php-xml php-mbstring

Run the following commands to reload the PHP configuration, to restart and verify the status of the Apache service as well:

systemctl restart httpd
systemctl status httpd

Step 3: Install WordPress in Rocky Linux 9

Initially, it’s required to install the “wget” command to download, extract, move, and set specific permissions for WordPress files by running the following commands.

yum install wget

Download the latest version of WordPress and make sure you put the “latest.tar.gz” at the ending (at this time the latest version of WordPress is 6.5.2):

wget https://wordpress.org/latest.tar.gz

Extract the downloaded files:

tar -xzvf latest.tar.gz

It’s required to move WordPress files to the Apache web server’s root directory, despite it allowing the webserver to serve the WordPress site correctly when users access it through a web browser:

cp -r wordpress/* /var/www/html/

Set the specific permissions for WordPress files, and verify the “html” directory permissions via the “ls” and “grep” commands:

chown -R apache:apache /var/www/html/
chmod -R 755 /var/www/html/
ls -l /var/www | grep html


Step 4: Configuration of Database

Create a new database and user by typing a current MariaDB root password if you’ve not changed a root password during MariaDB installation step:

mysql -u root -p

Create a new database:

CREATE DATABASE IT4U;


Create a new user and set a password:

CREATE USER 'arazahmadov'@'localhost' IDENTIFIED BY 'Pass123';

To perform any operation on a specific database or tables within that database grants privileges to a specific user:

 GRANT ALL PRIVILEGES ON IT4U.* TO 'arazahmadov'@'localhost';

Apply the privileges and exit.

FLUSH PRIVILEGES;
EXIT;

Step 5: Configuration of WordPress

Rename the original WordPress configuration file, and verify via the “ls” and “grep” commands:

cd /var/www/html/
mv wp-config-sample.php wp-config.php
ls -l | grep wp-config.php

Open the “wp-config-php” configuration file and replace the following lines to identify with the database settings previously made:

wp-config.php
define ('DB_NAME', 'IT4U');
define ('DB_USER', 'arazahmadov');
define ('DB_PASSWORD', 'Pass123');

Step 6: Configuration of Firewall settings

Run the following commands to add “http“, and “https” protocols to the firewall and verify via the grep command:

firewall-cmd --permanent --add-service=http 
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
firewall-cmd --list-all | grep http

Step 7: Log in to WordPress

Log into the WordPress website by typing http://your_server_ip_address/wp-admin” and include the credentials you set during the previous installation process:

How To Install WordPress On Rocky Linux 9 – FAQs

What are the system requirements for installing WordPress on Rocky Linux 9?

You’ll need a LAMP stack (Linux, Apache, MySQL, PHP), PHP version 7.4 or higher, MySQL or MariaDB, and sufficient disk space.

How can I install a LAMP stack on Rocky Linux 9 for WordPress?

Use the package manager to install Apache, MySQL/MariaDB, PHP, and necessary modules like php-mysql and php-gd.

Is it recommended to use a control panel like cPanel for managing WordPress on Rocky Linux 9?

While not mandatory, using a control panel like cPanel can simplify tasks such as database management and server configuration.

What security measures should I take after installing WordPress on Rocky Linux 9?

Secure your installation by setting strong passwords, regularly updating WordPress and its plugins/themes, using SSL/TLS certificates, and implementing security plugins.

How can I troubleshoot common issues during WordPress installation on Rocky Linux 9?

Check error logs, ensure file permissions are correct, verify database credentials, disable conflicting plugins/themes, and consult WordPress forums or support resources.

Conclusion

In conclusion, this article demonstrates that setting up WordPress is incredibly smooth and has proven to be a seamless experience, with both administrative and standard user functionalities working flawlessly. Installing and configuring it went smoothly, showing how well WordPress works in an open-source environment. By following the instructions provided here, users can easily and confidently start their websites or blogs on this reliable platform. With WordPress, you have the power to create, manage, and customize your online presence effortlessly, making it a pleasant experience for both creators and visitors.

Comments

Popular posts from this blog

Fayl Bərpa Alqoritmləri

  Salam dostlar, Bu yazımda sizə fayl bərpa proqramlarının (Recuva, Wondershare, EaseUS Data Recovery və s.) faylları bərpa etməsi haqqında bəhs etmək istərdim ki, məhz bu proqramlar silinmiş məlumatların (şəkil, video, sənəd və s.) geri qaytarılması üçün xüsusi alqoritmlərdən istifadə edir. Bu prosesin texniki tərəflərini izah etmək üçün əvvəlcə bir neçə əsas anlayışı bilmək lazımdır: Silinmiş faylların vəziyyəti Əksər fayl sistemlərində (məsələn, NTFS, FAT32, exFAT) fayl silindikdə, həmin fayl fiziki olaraq diskin üzərindən silinmir ki, bu zaman: Fayl sistemində faylın olduğu yer boş olaraq işarələnir və həmin sahə üzərində yeni məlumat yazıla bilməsi üçün icazə verilir; Faylın "metadata"-ları (fayl adı, ölçüsü, yaradılma tarixi və s.) xüsusi strukturlarda saxlanılır (məsələn, NTFS-də MFT / Master File Table). Bu səbəbdən, fayl silindikdən dərhal sonra onu bərpa etmək mümkündür, çünki həmin məlumat fiziki olaraq diskin üzərində qalır. Ancaq yeni məlumat həmin yerə yazıldıqd...

Antivirus Mexanizmi

Salam dostlar, Bu yazımda sizə antivirus mexanizminin necə işlədiyi haqqında bəzi məlumatları təqdim etmək istərdim. Belə ki, bildiyiniz kimi antivirus proqramları kompüterlərin təhlükəsizliyini təmin etmək üçün ən vacib alətlərdən biridir ki, məhz virusları aşkar etmək, onların qarşısını almaq və onları zərərsizləşdirmək üçün nəzərdə tutulmuşdur. Beləliklə: 🔍 Virusun aşkarlanması Antivirus proqramları, əsasən, iki - imza əsaslı və davranış əsaslı üsulla virusları aşkar edir: İmza əsaslı aşkarlama (signature-based detection) - bu üsul, virusların əvvəlcədən müəyyən edilmiş imzaları (məlumat bazası) ilə müqayisə olunmasına əsaslanır. Hər bir virusun unikal bir imzası (kod parçası) olur və antivirus proqramı bu imzaları tanımaq üçün məlumat bazasını mütəmadi olaraq yeniləyir ki, bu üsul yalnız virusları aşkarlaya bilir; Davranış əsaslı aşkarlama (behavior-based detection) - bu üsul, virusun davranışına əsaslanaraq zərərli fəaliyyətləri müəyyən edir. Yəni, bir virusun fayllara icazəsiz...