Nginx Virtual Host Recipe for WordPress

Since more than one person has asked me for my Nginx Virtual Host recipe for WordPress sites, I’m posting it here. Be sure to change domain.tld to your actual domain name. The wildcard record will allow your site to respond to ANY sudomain request, which may not be something you want.

You’ll also need to change the path to your log files, as well as the path to your public webroot folder. Finally, up the client_max_body_size to match your upload_max_filesize and post_max_size settings in php.ini.

Finally, this assumes you are running your PHP fast cgi process on port 9000.

This is the recipe for WordPress (single site). I’ve also posted one for Drupal and WordPress MU / BuddyPress.

Download Nginx vhost Recipe for WordPress

Please post ways to improve this in the comments. I use this on a number of production sites, but there is always more one can do. Thanks to all of the blogs and articles that I ripped off helped me understand Nginx and got me started.

Hello There! Thank you for visiting my site.

This is the professional blog of Eric Marden, a veteran web developer, entrepreneur, and inspirational speaker.

If you're new here, please subscribe to my RSS feed. You'll get a blend of tech news, analysis, inspirational essays, and much more. Subscribe today.

1 Responses to “Nginx Virtual Host Recipe for WordPress”


Leave a Reply