Welcome to part 3 of an 8-part series on WordPress optimization focusing on web server configuration. This guide assumes completion of the previous installation steps for virtual server setup.
Why Nginx?
We’re in this for performance and nginx is an open source web server written to address some of the performance and scalability issues associated with Apache.
Installation Steps
Nginx Installation
Basic installation requires one command to deploy nginx with extras.
PHP-FPM Setup
Installation and configuration of PHP-FPM for handling PHP execution, including pool settings for performance optimization with specific parameters for child processes and request handling.
PHP Modules
Install additional PHP modules including CLI, dev tools, XML-RPC, curl, GD, APC, and others for WordPress functionality.
Configuration Files
Three configuration files are needed:
- Common configuration for standard settings
- WordPress-specific rewrite rules
- Core nginx configuration
Website Configuration
Final step involves creating site-specific configuration files in /etc/nginx/sites-enabled/ with domain-specific settings.