Best WordPress Cache plug-in: WP Super Cache

Source: Internet
Author: User
Tags wordpress blog wordpress cache
Document directory
  • WP Super Cache Status
  • Super Cache Compression
  • Mod Rewrite Rules
  • Expiry Time and Garbage Collection
  • Accepted filenames, rejected URIs
  • Rejected User Agents
  • Cache Contents
  • Lock Down
  • Directly Cached Files
  • Configuration messed up?
  • Cache Plugins

WP Super Cache is developed by WordPress official developer Donncha and is currently the most efficient and flexible WordPress static Cache plug-in. It directly generates HTML files for the entire webpage, so that Apache does not need to parse the PHP script. By using this plug-in, your WordPress blog can be significantly accelerated.

Basic Introduction to WP Super Cache

WP Super Cache is the WP-Cache 2 based on Ricardo Galli Granada. WP-Cache 2 can Cache your WordPress blog so that you do not need to access the database again, but it generates PHP files instead of HTML files, so you still need the PHP engine to parse them. WP Super Cache directly generates HTML files, so the server does not need to parse or even a line of PHP code, so the Cache speed is as fast as accessing an image on your server.

How does WP Super Cache work?

Half of the conventional Cache method is to manually save dynamic pages as HTML code. WP Super Cache also works in the same way, but it is completed automatically.

When a visitor visits your site, he does not log on or leave a message, so that he gets a pure static file under the supercache sub-folder under the WordPress cache folder, in fact, you can go to the supercache directory above to view the backup of HTML files with the same permanent link. Check whether a page has been cached. Check the source code of the page to see if the last line has been cached. <! -Super cache-> or <! -Super cache gz->.

If the visitor has logged on or left a comment, the page generated by the WP Cache function will be returned, and the last line will have <! -Cached page served by WP-Cache->

Basic use of WP Super Cache

Upload WP Super Cache to the plug-in directory and activate it under the plug-in directory. Then you can go to Setting> WP Super Cache for detailed configuration.

WP Super Cache Status

There are three options:

  • ON (WP Cache and Super Cache enabled)
  • Half on (Super Cache Disabled, only legacy WP-Cache caching .)
  • OFF (WP Cache and Super Cache disabled)

By default, WP Super Cache is not enabled. Therefore, if you select this option, the first one is Super Cache and the Cache is a static file. What if the second one is used, it is consistent with WP-Cache.

Proudly tell the world your server is Digg proof! (Places a message in your blog's footer)
This means that a message is displayed in your footer to tell the reader that the blog has been cached. Generally, do not do this.

Clear all cache files when a post or page is published. (This may significantly slow down saving of posts .)
This means that all the caches are cleared when new logs are published. This is definitely not the case.

Super Cache Compression

Starting this will generate gzip compression, saving your bandwidth.

Mod Rewrite Rules

WP Super Cache accesses static files through Mod Rewrite, so the added Mod Rewrite rule is displayed here.

Expiry Time and Garbage Collection

Expiration time and garbage collection. Here we mainly set the expiration time of cache files, and how often to delete expired cache files. Personal suggestion: Generally, the cache time is set to 1 day (86400), and the cache deletion time is 1 hour.

Accepted filenames, rejected URIs

Here, some links do not need to be cached, and special cases can be set.

Rejected User Agents

Some User Agents will not be cached during access. For example, Google and Baidu crawlers.

Cache Contents

The number of cached files and expired files in your blog is displayed here. You can manually delete the cached files and expired files. Because WP Super Cache has a garbage collection mechanism, you do not need to manually delete them here, if you test a plug-in and cannot see the effect, you can manually delete the plug-in here to test the reason for caching.

Lock Down

Generally, if a new message is sent to a log, the cached file is updated. However, whether the log has reached the cache time, you expect that your blog may have a lot of traffic and messages, and it may not be a good choice to update cached files repeatedly, but the speed is slower. At this time, you can lock the cached files, the new message does not update the cache log.

The plug-in author also provides a piece of code. If your blog is locked, you can determine a variableWPLOCKDOWNWhether your blog has been locked and will be updated later. Of course, it is not recommended for general blogs.

Directly Cached Files

Directly cache files and directly cache files based on permanent links. For example, your pages are not updated, you can directly cache it to your about directory (If your slug about the page is about), this direct cache will not expire. Suitable for some static pages that are not updated frequently.

Configuration messed up?

Because of the many configurations above, you may be confused, so here you can restore to the default with one click.

Cache Plugins

The cache plug-in also supports additional plug-ins. for example, the author provides a plug-in: No Adverts for Friends, which does not display advertisements to Friends.

Additional instructions
  • After logging on to and leaving a message, you cannot see the static Cache page. The effect is the same as that of the original WP-Cache plug-in. Generally, there are not so many people leaving messages.
  • This plug-in uses Mod Rewrite to access static cache pages. Therefore, your host must support Mod Rewrite, And then you must start a permanent link in the WordPress background.
  • Some dynamic and more fine-grained plug-ins, such as Recent Comments and Recent Posts, are implemented through Javascript. Therefore, Sidebar update can only be updated when the static page is refreshed. I will explain how to implement Recent Comment, Recent Post, and PostViews in JS.
  • Do not use a host with poor performance. Although it is cached, it still won't work. Here I personally recommend the host I am working with my friends: WFANS host.
  • There are also many plug-ins that rely on data refresh, such as SK2 and Bad Behaviour, which may not work. Caching always leads to a lack of flexibility.

I have not used this plug-in for a long time. If you have any new discoveries, leave a message to tell me!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.