Fastest server stack configuration for WordPress?

There’s a post here that’s very good about load optimization and performance: Steps to Optimize WordPress in Regard to Server Load? It might be a good idea to also utilize a CDN for a majority of your page requests. If you want performance you’ll have to minimize requests to your database and setup aggressive caching. … Read more

How to configure nginx to redirect requests to the uploads directory to the production server?

You could try something like this: server { root /srv/www/example/htdocs; index index.php; # Matches any URL containing /wp-content/uploads/ location ~ “^(.*)/wp-content/uploads/(.*)$” { try_files $uri @prod_serv; } # Will redirect requests to your production server location @prod_serv { rewrite “^(.*)/wp-content/uploads/(.*)$” “http://yourdomain.com/m/wp-content/uploads/$2” redirect; } # The rest of your location blocks… location /m { index index.php; try_files … Read more

Nginx – Prevent Access to Debug file [closed]

I’ve frequently seen this used in Apache 2.2: <Files “debug.log”> Order allow,deny Deny from all </Files> but that’s deprecated in Apache 2.4: The Allow, Deny, and Order directives, provided by mod_access_compat, are deprecated and will go away in a future version. You should avoid using them, and avoid outdated tutorials recommending their use. I just … Read more

nginx or cherokee ( +php-fpm ) for WordPress backend?

From what I’ve seen on the market, Nginx and Cherokee are pretty interchangeable for what you’re doing. If you’ve already got things set up on Nginx … there’s no reason to switch to a different system. But if you want some benchmarks … I did a quick Google search and came up with these: http://blog.mudy.info/2009/02/nginx-vs-cherokee/ … Read more

Nginx FastCGI_Cache Vs PHP Caching

Nginx is really good at concurrency (PHP not so much) so you should try a bit more than 180 requests per second. Maybe 500, or 1000 depending on your server resources and network throughput. The fastcgi_cache is served directly from ram. Wp-super-cache uses php to read a static file from the SSD so I see … Read more

WordPress Multisite, NGINX and WordPress Subdirectory Install

You might check in General Settings: Home URL should be http://example.com Site URL should be http://example.com/wp When you open http://example.com, what URL does it show for …/twentythirteen/style.css? Do you see the “broken” URL http://example.com/wp/test-network-site/wp-content/themes/twentythirteen/style.css in the source? If so, it suggests WordPress might be using a wrong path (not necessarily nginx). I think that should … Read more

Setting 404 page in Nginx

Remove the ‘fastcgi_intercept_errors’ argument from you configuration. It’s unnecessary since ‘error_page’ declares 404 errors, which should be handled by index.php, which will trigger PHP-FPM to handle it, and WordPress to present your theme’s 404 page. It seems counter-intuitive, but ‘fastcgi_intercept_errors’ is actually causing PHP not to handle the error page.