
This guide provides a step-by-step approach to installing phpMyAdmin and WordPress on Rocky Linux. Customize the paths, IPs, and database configurations as needed for your specific setup.
Prerequisites: Ensure that your Rocky Linux system has sudo enabled and that you have already installed the LAMP (Linux, Apache, MySQL/MariaDB, PHP) stack.
Step 1: Install phpMyAdmin
sudo dnf --enablerepo=remi install phpmyadmin -yy
Step 2: Configure phpMyAdmin for Remote Access
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
In the configuration file, comment out the line that says ‘Require local
‘ and add ‘require ip
‘ lines for local and other IPs as needed. For example:
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
Require all granted
require ip 127.0.0.1
require ip ::1
require ip 192.168.43.44
# Require local </Directory>
Step 3: Restart Apache
sudo systemctl restart httpd
Step 4: Access phpMyAdmin
Navigate to the address of the webserver using a browser. If you are on the local machine, it may be localhost
, or you can use the server’s IP on the LAN, followed by /phpmyadmin
. For example, localhost/phpmyadmin
or 192.168.43.1/phpmyadmin
. Log in with the username root
and the password used during mysql_secure_installation
. Create a new database and user account as needed for your WordPress installation.
Step 5: Install WordPress
Download WordPress, unzip it, and move it to the desired directory within the default HTML folder:
cd ~/
wget https://wordpress.org/latest.zip unzip latest.zip sudo mkdir /var/www/html/testsite
sudo mv wordpress /var/www/html/foss
Change the ownership of the WordPress files to the Apache user:
cd /var/www/html/ sudo chown -R apache: * /var/www/html/testsite/
Step 6: Configure WordPress Database Connectivity
Copy the sample WordPress configuration file and edit it:
cd foss/
sudo cp /var/www/html/testsite/wp-config-sample.php /var/www/html/testsite/wp-config.php
sudo nano /var/www/html/testsite/wp-config.php
Modify the database name, username, password, and paste the generated salts. Save and exit the file.
Step 7: Create the Uploads Directory
sudo mkdir /var/www/html/foss/wp-content/uploads
sudo chown -R apache: * /var/www/html/foss/
Step 8: Access the WordPress Website
Visit the website in your browser, e.g., localhost/testsite
or 192.168.43.4/testsite
. Follow the on-screen instructions to set up the website, including providing a title, user details, and admin web address. For the admin panel, access /wp-admin
, e.g., localhost/testsite/wp-admin
or 192.168.43.4/testsite/wp-admin
.
Leave a Reply