Hacker News new | past | comments | ask | show | jobs | submit login

[deleted]



Please don't delete it! I'll edit this comment with my reply, just don't delete it!

Edit: Thank you for the pointers, I'll wait out tonight and gather data from top and google analytics. I think it might be an interesting post to make. At present top is reporting a load average of ~0.7 and the website is responsive.

As I feared W3TC needs edits to the nginx config. I was hoping to avoid touching the config files but that was just me being lazy. I promise the site will be cached before my next submission.


It shouldn't but maybe I recall wrong... what are you looking at? You appear to already have the seo-friendly URLs setup in nginx? That, I think, is enough?

Basically you should disable cgi.fix_pathinfo in php.ini and have something like (in your server block)

    location ~ ^.+\.php {
    include        fastcgi_params;
    fastcgi_pass   unix:/var/run/php5-fpm.sock;
    fastcgi_index  index.php;

    fastcgi_split_path_info ^(.+\.php)(.*)$;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param  PATH_INFO       $fastcgi_path_info;
    }


If you can install it, the best caching solution is varnish. Much better than the wp-supercache and the likes of it (namely because it is can manage both RAM and disk cache, with very good content discard strategies). Configuration for WordPress is actually pretty easy, drop me an email if you need some help (don't cache anything under wp-admin and don't cache for logged in users)


Varnish won't cache anything for logged in users by default because they'll have a session cookie. Actually, the main challenge with rolling out Varnish is making sure that anonymous users don't have any extra cookies set that could make Varnish think they are not all the same.


Yes, the default config does have that (safe) behaviour. It's rather easy to change, by replacing the vcl_recv function in the config. Something like:

  sub vcl_recv {
    if (req.http.cookie ~ "wordpress_logged_in_|comment_author_|wp-postpass_") {
      return (pass);
    }
    return (lookup);
  }


FWIW - I ended up switching to wp-supercache as I had so many issues with W3TC.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: