ngx_pagespeed + WordPress + memcached

161 views
Skip to first unread message

Michael Halvorsen

unread,
Jun 29, 2015, 2:47:21 AM6/29/15
to ngx-pagesp...@googlegroups.com
I hate to ask a question that I am sure has been asked a million times, but I haven't found a good tutorial or write up on the best practices to use ngx_pagespeed with WordPress.

I'd rather not use a plugin. Does anyone have a sample ngnix configuration file with the best rules to use with WordPress?

Thanks so much.

Jeff Kaufman

unread,
Jun 29, 2015, 9:03:57 AM6/29/15
to ngx-pagesp...@googlegroups.com
ngx_pagespeed works well with WordPress with its default configuration:

pagespeed on;

# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;

# Ensure requests for pagespeed optimized resources go to the
pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }

You also probably want a caching plugin for wordpress, so it doesn't
have to generate your pages on demand.
> --
> You received this message because you are subscribed to the Google Groups
> "ngx-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ngx-pagespeed-di...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ngx-pagespeed-discuss.
> For more options, visit https://groups.google.com/d/optout.

Michael Halvorsen

unread,
Jun 29, 2015, 8:38:44 PM6/29/15
to ngx-pagesp...@googlegroups.com
Hey Jeff -

Thanks so much for your reply. I have tested W3 Total Cache and it is buggy. I can't use a plugin like that with so many variables and so many ways to break. 

I found a WordPress plugin called WP-FFPC that is pretty light weight:


Does anyone have any experience running the ngx_pagespeed module with WP & this WP-FFPC plugin? I'm looking for the most lightweight plugin to use to cache the pages in memcached.

Does Google have a WordPress plugin that makes the config easier for WP?

Thanks so much.
Reply all
Reply to author
Forward
0 new messages