Finally got WP-Super-Cache to Work!

datePosted on 12:15, September 6th, 2008 by Strangely

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.

Amazon Related:

Possibly Related Sites
Related Posts by Tags

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

  1. TIM on October 24th, 2008 at 1:45 pm

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

    Like or Dislike: Thumb up 0 Thumb down 0

  2. Strangely on October 24th, 2008 at 3:50 pm

    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…;-)

    Like or Dislike: Thumb up 0 Thumb down 0

  3. The IceMan on October 26th, 2008 at 1:13 am

    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

    Like or Dislike: Thumb up 0 Thumb down 0

  4. Strangely on October 26th, 2008 at 11:47 am

    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

    Like or Dislike: Thumb up 0 Thumb down 0

  5. The IceMan on November 22nd, 2008 at 6:27 pm

    i think is’t the PHP safemode limition

    thank

    Like or Dislike: Thumb up 0 Thumb down 0

  6. Strangely on November 23rd, 2008 at 4:10 pm

    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

    Like or Dislike: Thumb up 0 Thumb down 0

  7. rebus on March 2nd, 2009 at 12:12 pm

    For me – changing $sem_id value worked.

    Like or Dislike: Thumb up 0 Thumb down 0

    • Strangely on March 2nd, 2009 at 1:00 pm

      How do you mean, rebus? Where does that go?

      Like or Dislike: Thumb up 0 Thumb down 0

  8. micheal.smith898 on November 7th, 2009 at 5:57 am

    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,

    Like or Dislike: Thumb up 0 Thumb down 0

Leave a Reply

Name: (required)
Email: (required) (will not be published)
Website:
Comment:

Comments links could be nofollow free.

Spam Protection by WP-SpamFree

Improve the web with Nofollow Reciprocity.

Recent Posts

Archives

Topics

© 2007-2010 Strangely Perfect All Rights Reserved

Easy AdSense by Unreal

Strangely Perfect is Digg proof thanks to caching by WP Super Cache