PHP & Nginx
In this module you will install Nginx and PHP-FPM, the two core services that power a modern WordPress server. You'll bring their configuration into your version-controlled layout, set sane defaults for workers and limits.
Next, you'll configure Nginx specifically for WordPress, making sure PHP requests are handled correctly and permalinks work as expected. You'll also route your domain securely through Cloudflare, enforce origin certificates, and configure Nginx to log the real visitor IPs rather than Cloudflare's.
Finally, you'll review your PHP setup with phpinfo()
, confirm which settings
are active, and configure per-site logging for both Nginx and PHP-FPM. With
logrotate in place, your log files will remain small and manageable as your
server handles more traffic and more sites.
Lessons in this module
- Installing Nginx
- Installing PHP-FPM
- Understanding your sites configuration layout
- Creating the PHP configuration
- Nginx configuration for WordPress
- Routing your domain securely via Cloudflare
- Reviewing your configuration with phpinfo()
- PHP-FPM and Nginx logging
Next module: MariaDB