Guide on Installing WordPress on AlmaLinux 9 using Apache, MariaDB, and PHP 8.3 (LAMP Setup)
Setting Up WordPress on AlmaLinux 9 with LAMP Stack
To run WordPress on AlmaLinux 9 and enjoy its benefits, such as faster execution, enhanced syntax, JIT compilation support, and improved plugin and theme performance, you'll need to install PHP 8.3 from the Remi repository. Here's a step-by-step guide to help you achieve this:
1. Update your system Before starting, ensure your system is up-to-date by running:
2. Install Apache web server Install Apache with: Enable it to start on boot:
3. Install MariaDB server Install MariaDB with: Start/enable it:
4. Secure MariaDB and create WordPress database Secure your MariaDB and create a database and user for WordPress by running: Then log into MariaDB and execute the following SQL commands:
5. Install PHP 8.3 and required extensions Install PHP 8.3 from Remi repository:
6. Download and extract WordPress Navigate to Apache’s web root and download WordPress latest archive:
7. Configure permissions and ownership Set the correct permissions for directories and files related to WordPress:
8. Create WordPress configuration file Copy the sample config:
Edit and set database name, user, and password as created in MariaDB.
9. Configure Apache for WordPress Create or edit a VirtualHost config if using a domain, otherwise the default config should work. Make sure is enabled for permalinks.
10. Adjust firewall Allow HTTP (and optionally HTTPS) ports:
11. Restart Apache
12. Access WordPress web installer Open your browser to your server IP or domain (e.g., ) and complete the WordPress setup through the web interface.
This process aligns with best practices and instructions tailored to AlmaLinux 9 and PHP 8.3 from community guides.
Summary:
| Step | Command or Action | |-------------------------------|-------------------------------------------------------------------------------------------| | Update system | | | Install Apache | | | Install MariaDB | | | Secure MariaDB & create DB | SQL commands to create DB and user | | Install PHP 8.3 with modules | Set up Remi repo and install PHP 8.3 + essential extensions | | Download WordPress | and extract | | Fix ownership & permissions | | | Configure wp-config.php | Edit with database credentials | | Firewall | Open ports 80 and 443 | | Restart Apache | | | Complete web installer | Access site via browser and finish setup |
This ensures WordPress runs securely and effectively on AlmaLinux 9 using MariaDB, Apache, and PHP 8.3. For more information on optimizing the performance of WordPress on AlmaLinux 9, check out our guide on best practices.
Despite using the LAMP stack for setting up WordPress on AlmaLinux 9, having up-to-date technology like PHP 8.3 is essential for optimal performance, plugins, and themes.
By installing PHP 8.3 from the Remi repository, you'll experience faster execution, enhanced syntax, JIT compilation support, and improved plugin and theme performance on your WordPress site.