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 Comments

Baris Unver (1 comments.) on September 7, 2010 at 6:52 pm.

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” :)

Reply

Donncha (1707 comments.) on September 7, 2010 at 9:57 pm.

Baris – not to worry, you can switch it back to “Easy” by selecting the correct radiobox!

Reply

Alex (Viper007Bond) (2 comments.) on September 8, 2010 at 12:52 am.

Installed. Working great so far!

Reply

Feel (1 comments.) on September 8, 2010 at 7:19 am.

Will be compatible with nginx?

Reply

Donncha (1707 comments.) on September 8, 2010 at 7:42 am.

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.

Reply

Nicholas Teo (3 comments.) on September 9, 2010 at 10:49 am.

I am using WP Super Cache on my site now. This will make managing it a lot easier for me since I am not technically incline.

Reply

Edwin (1 comments.) on September 9, 2010 at 1:18 pm.

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.

Reply

miklb on September 14, 2010 at 5:26 pm.

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.

Reply

Donncha (1707 comments.) on September 20, 2010 at 2:53 pm.

Just fixed this (again) so grab the latest development code!

Reply

Lucky Lester (2 comments.) on September 22, 2010 at 4:02 am.

Tried using your email form from your about page and it seems to be hanging. Is there another way to contact you?

Reply

Donncha (1707 comments.) on September 23, 2010 at 9:26 am.

Use my email address listed on the About page!

Reply

JTPratt Media (6 comments.) on September 23, 2010 at 9:35 am.

@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).

Reply

Donncha (1707 comments.) on September 23, 2010 at 10:02 am.

This is one of those rare times I think it’s legit as he came from my About page (Thanks comment referrers!)

Anyway, Google won’t see a link until he leaves several comments. Check this page in another browser to see :)

Reply

JTPratt Media (6 comments.) on September 23, 2010 at 10:31 am.

ahh…good to know. I’ve been seeing so many of those “your about page didn’t work” spams that I may have spoken too soon…=)

Lucky Lester (2 comments.) on September 23, 2010 at 4:20 pm.

A little judgmental eh JT.

JTPratt Media (6 comments.) on September 23, 2010 at 9:51 pm.

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…

Alex (1 comments.) on September 23, 2010 at 2:24 am.

Hi.
Nice plugin.
Congratulations!
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?

Reply

Donncha (1707 comments.) on September 23, 2010 at 9:27 am.

It is a good idea. I’ll keep it in mind.

Reply

JTPratt Media (6 comments.) on September 23, 2010 at 9:19 am.

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?

Reply

Donncha (1707 comments.) on September 23, 2010 at 9:28 am.

I’ve thought about it but it hasn’t been a priority. WP-Minify already does minification, and there are numerous CDN plugins.

Reply

JTPratt Media (6 comments.) on September 23, 2010 at 9:39 am.

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.

Reply

Donncha (1707 comments.) on September 23, 2010 at 10:05 am.

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)

Reply

Alan on September 24, 2010 at 3:17 am.

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!

Reply

Donncha (1707 comments.) on September 28, 2010 at 11:15 pm.

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!

Reply

Alan on September 24, 2010 at 4:06 am.

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!

Reply

Donncha (1707 comments.) on September 28, 2010 at 11:14 pm.

Most of the pages won’t refresh very often if the interval is 2 days. They’ll display the same info for 2 days.

Reply

Alan on September 29, 2010 at 9:05 pm.

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?

Thanks

Reply

Alan on October 9, 2010 at 3:37 am.

Hi,

Any thoughts on my last reply? Thanks!

Reply

Donncha (1707 comments.) on October 10, 2010 at 7:23 pm.

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.

Reply

Alan on October 11, 2010 at 3:57 pm.

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.

Scott on September 24, 2010 at 10:49 pm.

Looks great!
Do you have any plans to add alternative storage engines like this guy did :
http://svnpub.armadillo.homeip.net/wp-supercache-plus/tags/Release-0.7.5.5/storage

Reply

Donncha (1707 comments.) on October 10, 2010 at 7:25 pm.

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.

Reply

Josh matthews on September 25, 2010 at 2:37 am.

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.

Reply

Donncha (1707 comments.) on September 28, 2010 at 11:16 pm.

Yeah, that’s a change in this version. I’m surprised anyone noticed!

Reply

Jazzvox (1 comments.) on September 26, 2010 at 12:29 pm.

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.

greetings,
mathias

Reply

Donncha (1707 comments.) on September 28, 2010 at 11:17 pm.

Thanks Mathias for the translation!

Reply

George (1 comments.) on September 26, 2010 at 4:29 pm.

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.

Reply

Donncha (1707 comments.) on September 28, 2010 at 11:11 pm.

Activate it network wide.

Reply

Jeremy Clarke (7 comments.) on September 27, 2010 at 6:47 pm.

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.

Reply

Donncha (1707 comments.) on September 28, 2010 at 11:07 pm.

Thanks for the reminder, I have to use that more often!

Reply

之乎者也 (1 comments.) on September 29, 2010 at 7:32 pm.

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

Reply

James Maurer (1 comments.) on September 30, 2010 at 2:48 pm.

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!

Reply

Sarah (1 comments.) on September 30, 2010 at 5:57 pm.

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. :D

Reply

Ankit Sharma (1 comments.) on October 8, 2010 at 7:57 am.

Hi,
In WP-Super cache, I have set preload time to 2400 minutes.
But every time it gets executed I get an email:

Preload may have stalled.
Preload has been restarted.
http://www.mywebsite.com/wp-admin/options-general.php?page=wpsupercache

Earlier I used to get same email so many times hence I changed the preload time from 60 minutes to 2400.
Can you tell me what could be the problem?
Thanks

Reply

Ben on October 15, 2010 at 6:37 pm.

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

Reply

TrishaG on October 16, 2010 at 11:49 pm.

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

Reply

Donncha (1707 comments.) on October 20, 2010 at 4:59 pm.

You have to edit the file, and you’ll find it.

Reply

Ben on October 28, 2010 at 4:58 pm.

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.

Reply

Donncha (1707 comments.) on October 28, 2010 at 5:06 pm.

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.

Reply

Ben on October 28, 2010 at 5:17 pm.

That worked, thanks a lot!

Reply

Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

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>


Holy Shmoly! is Stephen Fry proof thanks to caching by WP Super Cache