I’ve been given the task to get a wordpress 3.5 multi domain site with about 50 sites (each with woocommerce on it) up and running with Nginx to make it as fast as possible. I’ve got it working on your site, but I can’t say it’s fast yet…
When loading the front page, the html comments of nginx-helper say it took about 19 seconds with 188 queries. That seems a bit much for a simple page (http://www.vuurwerkhuizen.nl).
Looking at the analysis of gtmetrix.com (Report) it seems that the slow load is coming from the images, I see that loading a single image takes almost 2.5 seconds…
In your manual (https://rtcamp.com/wordpress-nginx/tutorials/multisite/static-files-handling/) you are referring to the blogs.dir directory. but as this is a 3.5 installation, it doesn’t exist any more. Can you tell me how I can speed up the websites? I can’t really use caching because i’ve got Woocommerce on every page…
first off, here are the config files:
nginx site config:
map $http_host $blogid { default -999; include /var/www/website/htdocs/wp-content/uploads/nginx-helper/map.conf; }
server {
# Uncomment the following line for domain mapping
listen 80 default_server;
server_name website.tld;
# Uncomment the following line for domain mapping
server_name_in_redirect off;
access_log /var/log/nginx/access.log rt_cache;
error_log /var/log/nginx/error.log;
root /var/www/website/htdocs;
index index.php index.htm index.html;
include common/wpfc.conf;
include common/wpcommon.conf;
include common/locations.conf;
#Skip cache for WooCommerce Query string
if ( $arg_add-to-cart != "" )
{
set $skip_cache 1;
}
if ($request_uri ~* "/store.*|/cart.*|/my-account.*|/checkout.*|/addons.*|/winkelwagen.*|/winkel.*|/mijn-account.*")
{
set $skip_cache 1;
}
if ( $cookie_woocommerce_items_in_cart != "0" )
{
set $skip_cache 1;
}
#WPMU Files
location ~ ^/files/(.*)$ {
try_files /wp-includes/ms-files.php?file=$1 =404;
access_log off; log_not_found off; expires max;
} }
php.conf:
location / { try_files $uri $uri/ /index.php?$args; }
location ~ .php$ {
set $rt_session "";
if ($http_cookie ~* "wc_session_cookie_[^=]*=([^%]+)%7C") {
set $rt_session wc_session_cookie_$1;
}
if ($skip_cache = 0 ) {
more_clear_headers "Set-Cookie*";
set $rt_session "";
}
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php;
}
The other configuration files are still the same as they came with easyengine.
Thank you for your help and kudos to the easyengine! It makes my life a lot easier