Skip to main content

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

Next module: MariaDB