Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

How do you set up routing rules correctly with Nginx to support WP Super Cache for a WordPress (3.x) site?

share|improve this question
    
You can use easyengine (goo.gl/Wzidcu) to setup WordPress with WP super cache. –  Abhishek Kaushik Nov 8 '13 at 12:23
add comment

2 Answers

up vote 1 down vote accepted

Hi @jschoolcraft:

Does this articles address your question?

If not, maybe there would be something in these?

share|improve this answer
1  
The 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. –  Joost Schuur Sep 1 '10 at 4:30
    
@Joost Schurr - Nice follow up! –  MikeSchinkel Sep 1 '10 at 5:05
    
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. –  Jeff Schoolcraft Sep 9 '10 at 11:04
    
@Jeff Schoolcraft: Good deal! –  MikeSchinkel Sep 9 '10 at 11:06
    
Except for the no closing HTML part. looks like a bunch of plugins use ob_start() which might be causing my problems. –  Jeff Schoolcraft Sep 9 '10 at 11:43
add comment

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.

share|improve this answer
    
@mitcho - Very nice find! –  MikeSchinkel Sep 1 '10 at 5:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.