To install WordPress with LEMP on Rocky Linux 9, follow the steps below.
Step 1 : Install LEMP Stack
If you haven't installed the LEMP stack yet, refer to the guide Rocky Linux 9 Guides.
Step 2 : Create Database
- Log in to your MySQL server.
- Create a new MySQL user and database.
Step 3 : Create a directory for your WordPress installation:
Step 4 : Change to the newly created directory:
Step 5 : Download WordPress:
Step 6 : Extract the downloaded file:
Step 7 : Move the files to the appropriate directory:
Step 8 : Set the correct permissions:
Step 9 : Configure Nginx for example.devtutorial.io
- Edit your Nginx configuration file:
- Add the following configuration:
Save and exit.
Step 10 : If SELinux is enabled, set the appropriate file context:
Step 11 : Test the configuration:
If successful, restart Nginx:
Step 12 : Open your browser and navigate to http://example.devtutorial.io
. Follow these steps:
- Click "Let's go!"
- Enter database information.
- If information is correct, click "Run the installation."
- Enter WordPress details and click "Install WordPress."
- Login to WordPress
Step 13 : Access the Dashboard
Congratulations! You have successfully installed WordPress with LEMP on Rocky Linux 9.