国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
Prerequisites
Step 1: Install PHP Modules in Rocky Linux
Step 2: Create Database for WordPress
Step 3: Download WordPress in Rocky Linux
Step 4: Set Ownership and Permissions on WordPress
Step 6: Create an Apache Configuration File for WordPress
Step 7: Set Up WordPress from a Browser
Home System Tutorial LINUX How to Install WordPress on Rocky Linux 8

How to Install WordPress on Rocky Linux 8

Jul 09, 2025 am 09:14 AM

WordPress is a powerful and feature-rich opensource content management system (CMS) that allows users to create powerful and stunningly beautiful websites. It’s written in PHP and powered by MariaDB or MySQL database server at the backend. WordPress is hugely popular and commands a market share of nearly 40% of all the websites hosted online.

Want to install WordPress on Rocky Linux? You’ve come to the right place. In this guide, we will demonstrate how to install WordPress on Rocky Linux 8.

Prerequisites

As a requirement, you need to have the LAMP stack installed on Rocky Linux 8. Also, be sure you have SSH access to your Rocky Linux instance and a sudo user configured.

Step 1: Install PHP Modules in Rocky Linux

A number of PHP modules are required for the installation of WordPress to proceed smoothly. In this regard, execute the following command to install them.

$ sudo dnf install install php-gd php-soap php-intl php-mysqlnd php-pdo php-pecl-zip php-fpm php-opcache php-curl php-zip php-xmlrpc wget

After the installation of the PHP modules, remember to restart the Apache webserver to load the installed PHP modules.

$ sudo systemctl restart httpd

Step 2: Create Database for WordPress

Moving forward, we are going to create a database for WordPress. This is the database that will hold all the installation and post-installation files for WordPress. Therefore, log in to the MariaDB database as follows:

$ sudo mysql -u root -p

Create the WordPress database.

CREATE DATABASE wordpress_db;

Next, create the database user and assign the password.

CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'your-strong-password';

Then grant all the privileges to the database user on the WordPress database.

GRANT ALL ON wordpress_db.* TO 'wordpress_user'@'localhost';

Save the changes and exit.

FLUSH PRIVILEGES;
EXIT;

The database is now in place. We are going to download the WordPress installation file and get underway with the installation.

Step 3: Download WordPress in Rocky Linux

At the moment, the latest version of WordPress is WordPress 5.8 codenamed ‘Tatum’. It is named after Art Tatum, a legendary and famous Jazz artist. We will download its archive file from the Official WordPress download site.

To achieve this, use the wget command-line tool to grab the latest archive file.

$ wget https://wordpress.org/latest.tar.gz -O wordpress.tar.gz

Once downloaded,, extract the compressed file.

$ tar -xvf wordpress.tar.gz

Next, copy the uncompressed wordpress directory to the webroot folder

$ sudo cp -R wordpress /var/www/html/

Step 4: Set Ownership and Permissions on WordPress

Next, set the ownership of the wordpress directory to apache user and group.

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

Then set the directory permissions as follows to allow global users to access the directory’s contents.

$ sudo chmod -R 775 /var/www/html/wordpress

Next, configure the SELinux context for the directory and its contents.

$ sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/wordpress(/.*)?"

For the SELinux changes to come into effect, run:

$ sudo restorecon -Rv /var/www/html/wordpress

How to Install WordPress on Rocky Linux 8

NOTE: You are likely to bump into the error – semanage: command not found. This is an indicator that semanage – a tool that handles the configuration of certain aspects of SELinux – is missing.

Therefore, we need to install the semanage tool. To check which package provides semanage run the command:

$ sudo dnf whatprovides /usr/sbin/semanage. 

From the output, we can see that policycoreutils-python-utils-2.9-14.el8.noarch package is the one that provides semanage and is readily available from the Rocky Linux BaseOS repository.

$ sudo dnf install policycoreutils-python-utils

Step 6: Create an Apache Configuration File for WordPress

Next, we are going to create an Apache configuration file for WordPress. This will point the Apache webserver to the WordPress directory and its contents.

To do this, run the command:

$ sudo vim /etc/httpd/conf.d/wordpress.conf

Then paste the following lines and save the changes.

<virtualhost>
ServerName server-IP or FQDN
ServerAdmin root@localhost
DocumentRoot /var/www/html/wordpress

<directory>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</directory>

ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
</virtualhost>

Restart Apache webserver for the changes to be effected.

$ sudo systemctl restart httpd

Then verify if the webserver is running:

$ sudo systemctl status httpd

At this point, all the configurations are done. The only thing left is to set up WordPress from a web browser which we will embark on in the next and final stage.

But before we do so, it’s prudent that we allow HTTP and HTTPS traffic on the firewall. HTTPS will come in handy in case you decide to encrypt the site with an SSL certificate.

To allow these protocols or services across the firewall, run the commands:

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

Then reload the firewall for the changes to be effected.

$ sudo firewall-cmd --reload

Great. Let’s finalize the setup.

Step 7: Set Up WordPress from a Browser

Launch your browser and head over to the URL provided.

http://server-IP/

You should see the following page. Go over the instructions and click on the ‘Let’s Go’ button to proceed to the next step.

How to Install WordPress on Rocky Linux 8

Fill out the WordPress database details and click ‘Submit’.

How to Install WordPress on Rocky Linux 8

If all seems good, you will get this page that prompts you to run the installation. So, click on the ‘Run the installation’?button.

How to Install WordPress on Rocky Linux 8

Next, provide the site details as you create an Admin user. Take careful note of the username and password details since you will use them to log in to WordPress at the very end.

How to Install WordPress on Rocky Linux 8

Then click on ‘Install WordPress’.

How to Install WordPress on Rocky Linux 8

A few seconds later, you will get a notification that the installation was successful. To log in, click on the ‘Login’ button.

How to Install WordPress on Rocky Linux 8

This takes you straight to the Login page. Type in the username and password we told you to take note of earlier and hit ‘Login’.

How to Install WordPress on Rocky Linux 8

This takes you to the WordPress directory as shown.

How to Install WordPress on Rocky Linux 8

Perfect! You have successfully installed WordPress on Rocky Linux 8. From here, you can proceed and create your blog or website and enjoy the immense benefits that WordPress provides including free themes, and plugins to enhance the appeal and functionality of your site.

Furthermore, you can also enable HTTPS on your WordPress website using our guide – Secure Apache with Let’s Encrypt Certificate on Rocky Linux

The above is the detailed content of How to Install WordPress on Rocky Linux 8. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

10 Best File Comparison and Difference (Diff) Tools in Linux 10 Best File Comparison and Difference (Diff) Tools in Linux Jun 11, 2025 am 10:26 AM

While writing program files or normal text files, programmers and writers sometimes want to know the difference between two files or two versions of the same file. When you compare two computer files on Linux, the difference between their contents is

How to create a new, empty file from the command line? How to create a new, empty file from the command line? Jun 14, 2025 am 12:18 AM

There are three ways to create empty files in the command line: First, the simplest and safest use of the touch command, which is suitable for debugging scripts or placeholder files; Second, it is quickly created through > redirection but will clear existing content, which is suitable for initializing log files; Third, use echo"> file name to create a file with an empty string, or use echo-n""> file name to avoid line breaks. These three methods have their own applicable scenarios, and choosing the right method can help you complete the task more efficiently.

How does the cost of ownership differ between Linux and Windows? How does the cost of ownership differ between Linux and Windows? Jun 09, 2025 am 12:17 AM

Linux's cost of ownership is usually lower than Windows. 1) Linux does not require license fees, saving a lot of costs, while Windows requires purchasing a license. 2) Linux has low hardware requirements and can extend the service life of the device. 3) The Linux community provides free support to reduce maintenance costs. 4) Linux is highly secure and reduces productivity losses. 5) The Linux learning curve is steep, but Windows is easier to use. The choice should be based on specific needs and budget.

5 Best Open Source Mathematical Equation Editors for Linux 5 Best Open Source Mathematical Equation Editors for Linux Jun 18, 2025 am 09:28 AM

Are you looking for good software to write mathematical equations? If so, this article provides the top 5 equation editors that you can easily install on your favorite Linux distribution.In addition to being compatible with different types of mathema

dutree - Analyze File System Disk Usage in Linux dutree - Analyze File System Disk Usage in Linux Jun 11, 2025 am 10:33 AM

dutree is a free, open-source, fast command-line tool for analyzing disk usage, written in the Rust programming language. It was created by combining durep (disk usage reporter) and tree (list directory content in tree-like format) command-line tools

15 Useful 'ifconfig' Commands to Configure Network in Linux 15 Useful 'ifconfig' Commands to Configure Network in Linux Jun 11, 2025 am 10:01 AM

ifconfig in short “interface configuration” utility for system/network administration in Unix/Linux operating systems to configure, manage, and query network interface parameters via command-line interface or in a system configuration scripts

How to Install Eclipse IDE in Debian, Ubuntu, and Linux Mint How to Install Eclipse IDE in Debian, Ubuntu, and Linux Mint Jun 14, 2025 am 10:40 AM

Eclipse is a free integrated development environment (IDE) that programmers around the world use to write software, primarily in Java, but also in other major programming languages using Eclipse plugins.The latest release of Eclipse IDE 2023?06 does

SCP Linux Command – Securely Transfer Files in Linux SCP Linux Command – Securely Transfer Files in Linux Jun 20, 2025 am 09:16 AM

Linux administrators should be familiar with the command-line environment. Since GUI (Graphical User Interface) mode in Linux servers is not commonly installed.SSH may be the most popular protocol to enable Linux administrators to manage the servers

See all articles