2. Why Nginx?
● Better performance of static content
● Better scalability (non-blocking
architecture)
● Ability to use as a proxy server in
conjunction with another web server such
as Apache
https://www.digitalocean.com/community/tu
torials/apache-vs-nginx-practical-
considerations
3. Should I?
Probably not:
● Local installs where Apache, ServerPress,
XAMPP, or MAMP is otherwise working fine
Maybe:
● New Server Instances/Installs
For sure:
● Servers where performance is a must
● Situations requiring a proxy to help lighten
static file requests
4. But Why?
● For fun! (nginx has a bright future)
● Greater understanding of “managed”
WordPress hosts
● Performance/Speed
Remember the “Why nots” - for many
switching is a zero-sum game.
6. Simplified WordPress Layer Cake
● Nginx - Full Web Server
● PHP - FastCGI Process Manager (FPM)
● MySQL - content data store
7. Trying it out
Basic nginx Install on Ubuntu:
https://www.digitalocean.com/community/tu
torials/how-to-install-linux-nginx-mysql-php-
lemp-stack-on-ubuntu-14-04
WordPress specific considerations:
https://www.digitalocean.com/community/tu
torials/how-to-install-wordpress-with-nginx-
on-ubuntu-14-04
More from Codex:
https://codex.wordpress.org/Nginx
12. Standard nginx WP include
/etc/nginx/includes/wp.conf
listen 80;
index index.php;
location / {
try_files $uri $uri/
/index.php?q=$uri&$args;
}
13. Standard nginx WP include (cont.)
location ~ .php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-
fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
14. Be Careful!
● These slide examples are simplified
● Many of the tutorials are outdated
● Follow best security practices!
15. MultiSite
Additional configuration only needed for
subdirectory multisite installations
Nginx Config:
https://codex.wordpress.org/Nginx#WordPres
s_Multisite_Subdirectory_rules
Nginx Helper - only needed for sites that
started life as WP 3.4 or earlier:
https://wordpress.org/plugins/nginx-helper/