This guide establishes a clean, modern baseline for WordPress hosting on Ubuntu.
Prerequisites
- Ubuntu LTS
- Root or sudo access
- DNS for your domain pointing at the server (or ready to switch)
Install core packages
sudo apt update
sudo apt install -y apache2 php-fpm php-mysql mysql-server
Enable event MPM
sudo a2dismod mpm_prefork
sudo a2enmod mpm_event proxy_fcgi setenvif
Enable PHP-FPM
sudo a2enconf php8.3-fpm
(Adjust version based on repo policy — 8.3 recommended, 8.4 if tested.)
Restart services
sudo systemctl restart apache2
Site structure
Docroot pattern:
/var/www/<site-root>
Each site should:
- Have its own vhost
- Use its own PHP-FPM pool when practical
- Log separately