亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

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)

Hot Topics

PHP Tutorial
1488
72
Install LXC (Linux Containers) in RHEL, Rocky & AlmaLinux Install LXC (Linux Containers) in RHEL, Rocky & AlmaLinux Jul 05, 2025 am 09:25 AM

LXD is described as the next-generation container and virtual machine manager that offers an immersive for Linux systems running inside containers or as virtual machines. It provides images for an inordinate number of Linux distributions with support

How to troubleshoot DNS issues on a Linux machine? How to troubleshoot DNS issues on a Linux machine? Jul 07, 2025 am 12:35 AM

When encountering DNS problems, first check the /etc/resolv.conf file to see if the correct nameserver is configured; secondly, you can manually add public DNS such as 8.8.8.8 for testing; then use nslookup and dig commands to verify whether DNS resolution is normal. If these tools are not installed, you can first install the dnsutils or bind-utils package; then check the systemd-resolved service status and configuration file /etc/systemd/resolved.conf, and set DNS and FallbackDNS as needed and restart the service; finally check the network interface status and firewall rules, confirm that port 53 is not

How would you debug a server that is slow or has high memory usage? How would you debug a server that is slow or has high memory usage? Jul 06, 2025 am 12:02 AM

If you find that the server is running slowly or the memory usage is too high, you should check the cause before operating. First, you need to check the system resource usage, use top, htop, free-h, iostat, ss-antp and other commands to check CPU, memory, disk I/O and network connections; secondly, analyze specific process problems, and track the behavior of high-occupancy processes through tools such as ps, jstack, strace; then check logs and monitoring data, view OOM records, exception requests, slow queries and other clues; finally, targeted processing is carried out based on common reasons such as memory leaks, connection pool exhaustion, cache failure storms, and timing task conflicts, optimize code logic, set up a timeout retry mechanism, add current limit fuses, and regularly pressure measurement and evaluation resources.

Install Guacamole for Remote Linux/Windows Access in Ubuntu Install Guacamole for Remote Linux/Windows Access in Ubuntu Jul 08, 2025 am 09:58 AM

As a system administrator, you may find yourself (today or in the future) working in an environment where Windows and Linux coexist. It is no secret that some big companies prefer (or have to) run some of their production services in Windows boxes an

How to Burn CD/DVD in Linux Using Brasero How to Burn CD/DVD in Linux Using Brasero Jul 05, 2025 am 09:26 AM

Frankly speaking, I cannot recall the last time I used a PC with a CD/DVD drive. This is thanks to the ever-evolving tech industry which has seen optical disks replaced by USB drives and other smaller and compact storage media that offer more storage

How to find my private and public IP address in Linux? How to find my private and public IP address in Linux? Jul 09, 2025 am 12:37 AM

In Linux systems, 1. Use ipa or hostname-I command to view private IP; 2. Use curlifconfig.me or curlipinfo.io/ip to obtain public IP; 3. The desktop version can view private IP through system settings, and the browser can access specific websites to view public IP; 4. Common commands can be set as aliases for quick call. These methods are simple and practical, suitable for IP viewing needs in different scenarios.

How to Install NodeJS 14 / 16 & NPM on Rocky Linux 8 How to Install NodeJS 14 / 16 & NPM on Rocky Linux 8 Jul 13, 2025 am 09:09 AM

Built on Chrome’s V8 engine, Node.JS is an open-source, event-driven JavaScript runtime environment crafted for building scalable applications and backend APIs. NodeJS is known for being lightweight and efficient due to its non-blocking I/O model and

How to Setup MySQL Replication in RHEL, Rocky and AlmaLinux How to Setup MySQL Replication in RHEL, Rocky and AlmaLinux Jul 05, 2025 am 09:27 AM

Data replication is the process of copying your data across multiple servers to improve data availability and enhance the reliability and performance of an application. In MySQL replication, data is copied from a database from the master server to ot

See all articles