Easy Setup for WP Super Cache

One of the things that has bugged me about the WP Super Cache settings page was how it was laid out. Well, the next version of the plugin will display a simplified settings page to new users. If you’re upgrading, you’ll get the same old page as ever, don’t worry.

This version also adds a new method of serving cache files. It uses PHP, but serves supercache files. So, it’s a halfway house between using mod_rewrite (difficult to install for some users), and the legacy caching of WP Cache. That caching will be what is activated for users who use the simplified settings page.

There are lots of other bug fixes. The cache tester works if WordPress is installed in a sub directory, the admin page is separated out into tabs now to make it easier to find things. Error messages show up as “update messages” at the top of the browser now, making it easier for new users to figure out when mod_rewrite rules need updating and when other house keeping tasks need doing.

The code is red hot, liable to bend and break and may cause problems but it works fine here and on a test multi site install but I need testers to hammer on it and do things I don’t expect. If you’re brave, grab the development version off the download page. Thanks!

52 thoughts on “Easy Setup for WP Super Cache

  1. I think you should show a notice about this after they (we) upgrade. I personally would be happy to change the settings’ settings to the “easy setup” 🙂

    1. It’s be compatible, but there won’t be docs for configuring it. PHP mode uses PHP to serve the cache files (obviously!) so you’ll have to go into the advanced configuration to use mod_rewrite and then replicate those rules with nginx rules you can find online.

  2. Going to try this one out. Always was a bit overwhelmed with the settings for super-cache. Hope this will help me, although I might not even need the plugin.

  3. Trying out the latest dev build on a test install running 3.0.1, and when I try to visit the supercache admin page, wp-admin/ms-admin.php?page=wpsupercache I get an error “Sorry, the WP Super Cache admin page only works on the main site of this network.” where main site is a link, which is trying to point to wpmu-admin…

    And this is definitely the main site of the install.

      1. @Donncha – that Lucky Lester comments is spam (look at the target URL), sent by automated software targeting blogs with high google pagerank. It’s a very commonly used tactic and phrase the black hatters and spammers use to gain blog comments (and backlinks). You can tell by the way they didn’t addresss anything specific in your post (and the fact that I got that exact same comment on a half dozen blogs). If it says that, or I can’t subscribe via RSS, how do I contact you, your site doesn’t look right in Opera or Chrome, where did you get your theme, or just about any other generic comment (that doesn’t mention the post content) – it’s spam (that Askimet cannot catch).

          1. more like “jaded” – sorry, I just get sooooo much spam, and your message was practically a duplicate of a dozen comments I got last week (that were spam). Sorry…

  4. Hi.
    Nice plugin.
    I have an ideia that would be interesting to many users.
    My sites are hosted in a VPS and they have a huge trafic during day… but at night, near 3 AM, the server load is less than 5%. It would be nice if I could choose a specific LOCAL time to start the PRELOAD CACHE. This way, the preload process would not use the server when it is needed for real users!

    What do you think, is it a good ideia?

  5. I think it’s great to have these settings for most users, it leaves the advanced things to those that can handle it. I’ve used WP Super Cache exclusively on all WP blogs I’ve setup, and only recently started using W3 Total Cache because of it’s ability to use a CDN, and object caching. Will either of these things be addressed in future versions of WP Super Cache?

      1. True. But having page cache, minification, db cache, object cache, browser cache, AND CDN in a single plugin is very nice. The speed difference was noticeably different (faster), and I thought object caching or CDN might make WP Super Cache might make it faster for my clients using it. I do, however, see the point and advantage of having separate plugins to separate things.

        1. It would be a full time job coding and supporting all those features and while I do work on this plugin as part of my job at Automattic I have other duties too.

          Oh, Supercache can use an object cache if available but it’s not very granular (ie. leave a comment and the whole cache gets blown away)

  6. Hi & thanks for your plugin…we use it on 3 sites!

    I noticed something after upgrading that I hoped you could explain to me.

    I noticed that Preload was not enabled yet from the Preload tab, I noticed “Currently Caching from post 100-200”, with the option to “cancel cache preload”. So, if Preload is disabled, why is this happening & why the option to cancel it as it is occurring?

    I have since adjusted the settings as per your recommendations & enabled pre-load, set it for 2 days, & began preloading now, which again brought the message “Currently Caching from post 100-200”. I also removed the user agents as suggested for my settings.

    Anyway, I assume I am misunderstanding how all of this works. Keep in mind when responding that although compared to Joe Blow walking down the street, I am probably a technological wonder, but writing a plugin of any kind is well beyond my abilities. I can create a hell of a robots.txt file though 😉

    I would appreciate your thoughts. Thanks!

    1. That’s a bug of some sort with preloading. Maybe it stalled the last time you used it? If preloading doesn’t work on your site then don’t sweat it. The search engines will populate your cache fairly quickly and steadily anyway!

  7. PS- Not sure what you mean by “If you don’t care about sidebar widgets updating often set the preload interval to 2880 minutes”.

    Would you mind clarifying this too? Thanks so much!

      1. Ohhhh…. So, ads in the sidebar could display form 2 days prior?? Hmmm…that doesn’t seem possible either considering that I don’t serve the ads on my site. Perhaps only sidebar info hosted from my own servers will remain the same…do I have that right?

        About my 1st comment…So I will just turn Preload back off. Do you still recommend removing the user agents?


        1. Use Javascript to load your adverts, and read the readme.txt or the documentation on WordPress.org, especially related to mfunc.

          I’d use Javascript though.

          1. Thanks for the reply. My ads are served up by an ad network & are JS. Not exactly sure what you are trying to say though & how all of this pertains to “preload” & whether or not the ads will refresh even though the cached pages will not.

            Still confused as to how the “user agent” settings operate too. Not sure if I should remove them or not considering that I turned off preload. Sorry! I appreciate your time & hope for just a bit more.

    1. The plugin has support for using an external object cache, so in theory it can use memcached, eaccelerator, xcache, apc etc. I only tested it with memcached and it’s very basic. Any action that invalidates the cache (leaving a comment, posting something, etc) will invalidate all cached pages.

      You should look at batcache too.

  8. I find an improved Gzipping system in this version, is that something you’ve done or just my change in settings. I’m not able to figure out.
    Like previously, when I approve a comment at the backend, that post goes Unzipped until someone visits that the next time. But now, it’s instantly Gzipping that post including that newly accepted comment. This is great.

  9. Hi Donncha, thanks for the great work.
    I wanted to customize/translate the “Comment moderation is enabled…” at the bottom of each of my posts. This made me real crazy, but it wasn’t easy to find out where it’s produced.
    Got You, finally!
    Now I’ve started to create the entire de_DE.po, seems to be a job for the coming weeks 😉
    Anyway, hope you and others ‘ll find that useful. Please mail back to my address so I can send it to you.


  10. I setup several networks with the WP Multinetwork and also use domain mapping to set alternative domains for different sites.

    Should I just activate WPSC on the main site (root site), or I need to activate it per site seperately?

    Thanks for your great job.

  11. It seems like this version along with all others makes WP_DEBUG completely barf when it’s activated. Do you ever use WP_DEBUG mode? It’s really useful during development, but as it is I have to completely disable Supercache in order to use it because of all the noise generated all over the place.

    Could you activate WP_DEBUG and fix the notices? They are all small things like defining a var before using it or checking isset($array[‘param’) before using it.

    Thanks for the plugin, sorry that WP_DEBUG is so picky.

  12. In wp-cache.php, on line 2390, you select all ID from the table `posts` where post_status is “publish” when caching in preload mode:

    $posts = $wpdb->get_col( “SELECT ID FROM {$wpdb->posts} WHERE post_status = ‘publish’ ORDER BY post_date DESC LIMIT $c, 100” );

    Thing is, not all items where post_status is “published” are of post_type = “post”, but also of post_type = “nav_menu_item”.

    Caching nav_menu_item will generate a 404 error and slow things down. post_name for nav_menu_item is always the same as ID, that is a number.

    To solve this, WP Super Cache must also check that post_type = “post” in its SQL statement:

    $posts = $wpdb->get_col( “SELECT ID FROM {$wpdb->posts} WHERE post_status = ‘publish’ AND post_type=’post’ ORDER BY post_date DESC LIMIT $c, 100” );

  13. I want to thank you for all the hard work you have put into this! Your plugin is fantastic and makes a huge impact on load times.

    I know it takes a lot of your time – it’s hard to balance family, websites, work, and friends and you should know that your efforts are greatly appreciated!

    Thank you!

  14. THANK YOU so so so much for this update! I was having the subfolder installation problem of the last version and had been using your ‘beta’ file until now. Also running some sites in MU mode and it updated and works great on all my quirky installations. 😀

  15. Hi,

    I have a problem with the pre-load option.. I set it to preload automatically every 1440 minutes because I was going to have it run once a day. I changed my mind and disabled it but it still sends me emails every day saying it has started the caching process? Then when I look in my cache it is going through all my posts caching them for me! I click to cancel the preload but this doesn’t seem to stop it, as it continues to complete even more files.

    I am wondering how do you actually de-activate the preload mode? I set the minutes to 0 to disable it but it still runs every day!

    Thanks for the help

  16. Hi Donncha,

    I have been trying to uninstall WPSuperCache for several days…
    here’s what I keep getting when I try to unistall….

    “UNINSTALL_WPSUPERCACHE must be set to a non-blank value in uninstall.php”

    I went to unistall.php but I can’t find where I am to put a value,…Please help.

    Thank you

  17. I’m not real saavy with cache or this plug-in, so I probably have a very basic question, but I’ve looked around and can’t seem to find an answer. How do I make it so I can see the changes I make on my site right away? The time frame I have set up now for any user is 1 hour, but I want to update my site and see the changes right away so I know if it looks correct or not. Thanks.

    1. If the changes weren’t the usual suspects like editing a post, page or making a comment then go into the settings page, “Tester & Contents” and clear the cache there.

      Or on the settings page check “don’t cache for known users” so you’ll always see the most uptodate page.

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.