How do you set up routing rules correctly with Nginx to support WP Super Cache for a WordPress (3.x) site?
2 Answers
Hi @jschoolcraft:
Does this articles address your question?
If not, maybe there would be something in these?
-
1The first link in Mike's response, straight from the SuperCache author is what you're looking for. Under Step 6), starting with '# if the requested file exists, return it immediately' are the rewrite rules to access the cached files from disk directly if they exist. This even bypasses WordPress entirely for static, cached content. Commented Sep 1, 2010 at 4:30
-
-
Yeah, this answers the question, or certainly addresses it. It looks like there was a comment in the first post about not having a closing </html> tag, I get the same thing... but my view source looks like: </div> <!-- div ft --> </body> </html> <!-- Page not cached by WP Super Cache. No closing HTML tag. Check your theme. --> Looks like it's there to me. Commented Sep 9, 2010 at 11:04
-
-
Except for the no closing HTML part. looks like a bunch of plugins use ob_start() which might be causing my problems. Commented Sep 9, 2010 at 11:43
Dan Collis-Puro has a great article on how Harvard Law used Nginx as a front-end proxy for WordPress, and has released a WordPress plugin which outputs some HTTP headers to interface with Nginx, also available in the article. The readme has information on how to get things set up.
Here's the article:
Note that at Harvard Law, they've completely abandoned all WP-side caching in favor of Nginx. The additional complexity in the WP side, they found, was completely unnecessary after getting nginx set up.