SlideShare a Scribd company logo
nginx [engine x]
and you! (with WordPress)
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
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
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.
Managed WordPress Layer Cake
● Cloudflare - High Speed DNS/SSL handling
● Varnish - Caching
● CDN - Library Delivery
● Nginx - static file proxy
● Apache - dynamic content requests
● PHP - dynamic content generation
● MySQL - content data store
Simplified WordPress Layer Cake
● Nginx - Full Web Server
● PHP - FastCGI Process Manager (FPM)
● MySQL - content data store
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
PHP-FPM configuration
/etc/php5/fpm (configuration home)
/etc/php5/fpm/php.ini
# for security purposes
cgi.fix_pathinfo=0
PHP-FPM configuration (cont.)
/etc/php5/fpm/pool.d/www.conf
# observe value for nginx configuration
listen = /var/run/php5-fpm.sock
nginx configuration
/etc/nginx (configuration home)
/etc/nginx/sites-available (sites available)
/etc/nginx/sites-enabled (sites “turned on”)
/etc/nginx/includes (created by me)
Site: http://tmp.thinky64.lan
/etc/nginx/sites-available/100-wp_tmp
server {
root /home/justin/src/tmp;
server_name tmp.thinky64.lan;
include includes/wp.conf;
}
Standard nginx WP include
/etc/nginx/includes/wp.conf
listen 80;
index index.php;
location / {
try_files $uri $uri/
/index.php?q=$uri&$args;
}
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;
}
Be Careful!
● These slide examples are simplified
● Many of the tutorials are outdated
● Follow best security practices!
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/
Site: http://folder.thinky64.lan
/etc/nginx/sites-available/100-wp_folder
#only needed if using nginx-helper plugin
map $http_host $blogid {
default 0;
include /home/justin/src/ms-folder/wp-
content/uploads/nginx-helper/map.conf;
}
http://folder.thinky64.lan (cont.)
server {
root /home/justin/src/ms-folder;
server_name folder.thinky64.lan;
include includes/wp-ms-subdir.conf;
}
Thank you!
Justin Foell
Partner @ 9seeds.com / WordPress Developer
justin@9seeds.com

More Related Content

PDF
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
PDF
Optimize drupal
PDF
WordCamp RVA
PPTX
Serve like a boss (part two)
PDF
Introducción a Nginx y PHP FPM
PDF
Setting up a local WordPress Environment
PPT
High Performance Wordpress
PPTX
Building Scalable Web Apps - LVL.UP KL
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Optimize drupal
WordCamp RVA
Serve like a boss (part two)
Introducción a Nginx y PHP FPM
Setting up a local WordPress Environment
High Performance Wordpress
Building Scalable Web Apps - LVL.UP KL

What's hot (15)

PDF
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
PDF
Memcache and Drupal - Vaibhav Jain
PDF
PBX on a non-specialized distro
PDF
Django book15 caching
PDF
T3DD12 Caching with Varnish
 
PPTX
AEM WITH MONGODB
PDF
Super performing websites with TYPO3 and Varnish
PDF
Caching for Cash: Caching
PDF
Caching for Cash: Benchmarking and Profiling
PDF
Wordpress hosting canada
PDF
Shared Hosting Hepsia.Co plan and feature
PDF
Screaming Fast Wpmu
ODP
Optimizing Drupal Performance (English)
PPT
Drupalcamp Estonia - High Performance Sites
PDF
Advanced Web Hosting
Magento Imagine eCommerce Conference February 2011: Optimizing Magento For Pe...
Memcache and Drupal - Vaibhav Jain
PBX on a non-specialized distro
Django book15 caching
T3DD12 Caching with Varnish
 
AEM WITH MONGODB
Super performing websites with TYPO3 and Varnish
Caching for Cash: Caching
Caching for Cash: Benchmarking and Profiling
Wordpress hosting canada
Shared Hosting Hepsia.Co plan and feature
Screaming Fast Wpmu
Optimizing Drupal Performance (English)
Drupalcamp Estonia - High Performance Sites
Advanced Web Hosting
Ad

Similar to Nginx [engine x] and you (and WordPress) (20)

PDF
What is Nginx and Why You Should to Use it with Wordpress Hosting
PDF
Speed up your development environment PHP + Nginx + Fedora + PG
DOCX
Installing lemp with ssl and varnish on Debian 9
PPTX
WordPress + NGINX Best Practices with EasyEngine
PDF
Nginx pres
PPTX
NGINX: Basics and Best Practices
PPTX
NGINX 101 - now with more Docker
PPTX
NGINX 101 - now with more Docker
PDF
ITB2019 NGINX Overview and Technical Aspects - Kevin Jones
PPTX
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
KEY
Nginx in production
PPTX
Nginx as a Revers Proxy for Apache on Ubuntu
PDF
Nginx for Fun & Performance - Philipp Krenn - Codemotion Rome 2015
PDF
Deploying nginx with minimal system resources
ODP
Introduction to Nginx
PPTX
Boost your website by running PHP on Nginx
PPTX
NGINX: Basics & Best Practices - EMEA Broadcast
PDF
Web servers presentacion
PDF
NginX - good practices, tips and advanced techniques
DOC
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
What is Nginx and Why You Should to Use it with Wordpress Hosting
Speed up your development environment PHP + Nginx + Fedora + PG
Installing lemp with ssl and varnish on Debian 9
WordPress + NGINX Best Practices with EasyEngine
Nginx pres
NGINX: Basics and Best Practices
NGINX 101 - now with more Docker
NGINX 101 - now with more Docker
ITB2019 NGINX Overview and Technical Aspects - Kevin Jones
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx in production
Nginx as a Revers Proxy for Apache on Ubuntu
Nginx for Fun & Performance - Philipp Krenn - Codemotion Rome 2015
Deploying nginx with minimal system resources
Introduction to Nginx
Boost your website by running PHP on Nginx
NGINX: Basics & Best Practices - EMEA Broadcast
Web servers presentacion
NginX - good practices, tips and advanced techniques
Nginx 0.8.x + php 5.2.13 (fast cgi) setup web server
Ad

More from Justin Foell (7)

PPTX
Gamify Task Management and Win!
ODP
Where do I go from here?
ODP
Pimp your Gmail to get more done
ODP
Minimum Viable Product
ODP
AJAX the WordPress way
ODP
Building your first WordPress plugin
ODP
Customizing the WP Admin for fun and profit
Gamify Task Management and Win!
Where do I go from here?
Pimp your Gmail to get more done
Minimum Viable Product
AJAX the WordPress way
Building your first WordPress plugin
Customizing the WP Admin for fun and profit

Recently uploaded (20)

PPTX
SAP Ariba Sourcing PPT for learning material
PPTX
artificial intelligence overview of it and more
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
Introduction to Information and Communication Technology
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PPT
tcp ip networks nd ip layering assotred slides
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
Internet___Basics___Styled_ presentation
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPT
Design_with_Watersergyerge45hrbgre4top (1).ppt
PPTX
Funds Management Learning Material for Beg
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
SAP Ariba Sourcing PPT for learning material
artificial intelligence overview of it and more
WebRTC in SignalWire - troubleshooting media negotiation
Introduction to Information and Communication Technology
PptxGenJS_Demo_Chart_20250317130215833.pptx
tcp ip networks nd ip layering assotred slides
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
presentation_pfe-universite-molay-seltan.pptx
Internet___Basics___Styled_ presentation
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
international classification of diseases ICD-10 review PPT.pptx
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Triggering QUIC, presented by Geoff Huston at IETF 123
An introduction to the IFRS (ISSB) Stndards.pdf
Design_with_Watersergyerge45hrbgre4top (1).ppt
Funds Management Learning Material for Beg
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
The New Creative Director: How AI Tools for Social Media Content Creation Are...
SASE Traffic Flow - ZTNA Connector-1.pdf

Nginx [engine x] and you (and WordPress)