I’ve finally sorted out why I couldn’t get WP Super Cache working…

For those that don’t know, the WordPress plugin is designed to deliver straight html pages to the client browser, zipped if the host will do it.  This makes page loads a lot quicker for the user – which is good! Normally, all pages are dynamically created on the fly for each client visit.  The database driven method of page generation is good for maintenance, but is a bit slow for the user, so I was interested in increasing usability, naturally.

Previously, I’d tried the thing and always gave up.  This time I battled through and the answer was right at the very bottom of the FAQs!

The key, for me, was to look at the page source, and right at the bottom I found:

<!– Page not cached by WP Super Cache. Could not get mutex lock. –>

Whacking this into a popular search engine led me to the bottom of the plugin’s FAQs, here, which is item 13 (unlucky for some) but isn’t explicitly defined.  All I did was to look for the line:

“$useflock = true”   in wp-content/wp-cache-config.php

Unfortunately, the syntax/wording is slightly different in the latest version.  But the principal is the same.  This is the current line:

$use_flock = true; // Set it true or false if you know what to use

I uncommented and left it at true, as it worked, which is all I was after.  Now I’ve started implementation on some of my more popular sites.  They seem to be a bit snippier and zipping is working on my (cheap) host.  This was especially important on Crawling Chaos because of the media files that also have to be delivered concurrently with my verbose content.

Related posts:
  1. How I Made my Website This site is set up using blogging software called WordPress....
  2. WordPress internal Post to Page Links don’t work properly As part of an update to a page, I found...
  3. Probable DDOS attack Using SQL Injection on my Websites Over the last day, my sites have been really slow...
  4. Combatting WordPress Trackback Comment Spam Two WordPress trackback spams lead our hero to investigate their...
  5. Shite (as a response to shite, I started Crawling Chaos) 2007 Start: I’ve set this down as I’m getting really...

Related posts brought to you by Yet Another Related Posts Plugin.

  9 Responses to “Finally got WP-Super-Cache to Work!”

  1. not working for … :(
    any thing else you can recommend?

  2. Hi Ice Man.
    I can’t recommend anything else, sorry. Usually, if something works then that’s all I need. Since I originally got the thing to work, there have been several updates to the plugin that have improved it quite a bit. I now have it running on all the WordPress installs I’m responsible for.
    Have you had trouble with it? The last update was this week…;-)

  3. i solved half of the problem.
    i can only cache only to the cache folder and not to the supercache

    i opened a help request on wordpress forums waiting for more help in the mater….

    thanks :)
    TIM

  4. The forums are the best place. They’ll prompt you in various ways even if the solution isn’t right there.
    If I recall, if it half-works, like you say, then that’s usually a hosting limitation, the same as the ability to serve gzipped pages.
    I found that you need

    • the folder permissions spot on
    • the bit of code in wp-config spot on
    • the bit of code in htaccess spot on

    If they are right then it should at least half-work!
    Rees

  5. i think is’t the PHP safemode limition

    thank

  6. TIM.
    If you still can’t get it to completely work, I recently read that you can use htaccess to do the caching for you.. You do it on a filetype basis if I recall, like jpg etc. I don’t know how well this would fit in with WordPress though. Maybe if you’ve fixed html pages as part of your website these could be cached in this way, mimicking what wp-cache is doing.
    This page http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html may give you some pointers. The whole of http://www.askapache.com/ is extremely helpful, well laid-out, detailed and readable. There are a host of external links to other related stuff.

    Rees

  7. For me -- changing $sem_id value worked.

  8. For those that don’t know, the WordPress plugin is designed to deliver straight html pages to the client browser, zipped if the host will do it. Websites are always helpful in one way or the other, anyways, a good way to get started to renovate your dreams into the world of reality. This makes page loads a lot quicker for the user – which is good! Normally, all pages are dynamically created on the fly for each client visit. The database driven method of page generation is good for maintenance, but is a bit slow.

    Thanks

    Micheal,

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Powered by Sweet Captcha
Verify your real existence,
Drag the smily to the T-shirt.
  • captcha
  • captcha
  • captcha
  • captcha

Attach a file Uploading File types: jpg, png, zip,pdf, Max size: 2Mbytes, Max count: 3
   
Use OpenDNS

© 2007-2012 Strangely Perfect All Rights Reserved