Installing WP Super Cache

If you are using DreamPress (DreamHost's managed WordPress hosting service), caching plugins and optimizations come preinstalled and preconfigured by default. Because of this, DreamPress sites do not need to install WP Super Cache.

Though WordPress is extremely versatile, your site may run less efficiently when it begins to receive more traffic. Since every WordPress page is processed by PHP, it can consume large amounts of memory on your web sever when you experience even a moderate amount of traffic. Because WP-Super Cache creates a static file cache of your site and loads that instead of using PHP to generate a page (thus reducing memory usage on your server), it's an outstanding plugin to help improve your site's load time and overall performance.

If you wish to learn more about other WordPress caching plugin options, please see the following article:

The following describes how to set up and use WP Super Cache.

Configuring WordPress permalinks

Because WP Super Cache requires the use of permalinks, you may need to configure them before you proceed, especially if you are using an older WordPress installation.

If you install WordPress utilizing the DreamHost One-Click Installer, permalinks are already set by default.

When you configure permalinks within WordPress, there are several options available. All permalink settings work with WP Super Cache except for the ‘Plain’ setting.

To change the permalinks settings:

  1. Open the WordPress Admin dashboard (e.g., 'example.com/wp-admin').
    01 WP Super Cache.fw.png
  2. Navigate to ‘Settings’ > ‘Permalinks’.
    Any of the options aside from Default will work, so your settings should look something like this:
    02 WP Super Cache.fw.png
  3. Click the Save Changes button to save your new settings.

How to set up WP Super Cache

Before you install WP Super Cache

If you have previously installed any other caching plugin, you should disable and remove it before installing WP Super Cache. In general, double caching is not recommended and can create conflicts that could slow down your WordPress site. Known plugins that conflict with each other are WP Cache and W3 Total Cache.

To remove previously installed caching plugins, open the WordPress Admin dashboard and then click ‘Plugins’ on the left to view and edit your list of plugins.

Installing WP Super Cache

To download and install WP Super Cache plugin:

  1. Open the WordPress Admin dashboard (e.g., 'example.com/wp-admin').
    03 WP Super Cache.fw.png
  2. Once logged in, click ‘Plugins’ > ‘Add New’.
  3. Towards the top right of the screen, search for WP Super Cache (or, wp-super-cache).
    04 WP Super Cache.fw.png
  4. Click the Install Now button next to WP Super Cache.
  5. In the pop-up that displays, click the OK button to save your changes.
    WP Super Cache installs and allows you to immediately activate it:
    06 WP Super Cache.fw.png

Activating WP Super Cache

To activate the WP Super Cache plugin:

  1. Select one of the following:
    • Click the ‘Activate Plugin’ link on the Installing Plugin page (see previous section), or
    • Go to the Plugins area of your admin dashboard (‘Plugins’ > ‘Installed Plugins’), and then click the ‘Activate’ link.
    When you activate the WP Super Cache plugin, the following appears:
    07 WP Super Cache.fw.png
  2. Click the ‘Settings’ link to open the WP Super Cache configuration page.
  3. Adjust your settings as needed. The following shows you a typical WP Super Cache Settings setup page:
    08 WP Super Cache.fw.png
  4. Click the ‘Caching On (Recommended)’ radio button, and then click the Update Status button.
    WP Super Cache automatically adds the following line to your wp-config.php file:
    define( 'WP_CACHE', true );

    If WP Super Cache fails to install, WordPress will provide links to its own troubleshooting documents.

Verifying WP Super Cache is actually working

To test WP Super Cache:

  1. Open the WP Super Cache admin page and click the 'Easy' tab.
    09 WP Super Cache.fw.png
  2. Click the Test Cache button, which tests if WP Super Cache is functioning.
    The following appears when you click the Test Cache button:
    10 WP Super Cache.fw.png

Changing the caching type

Click the 'Advanced' tab to view the different caching types. WP Super Cache supports two modes:

  • Simple
  • Expert (mod_rewrite)

You can change these in the ‘Advanced Settings’ tab:

11 WP Super Cache.fw.png

There are pros and cons for each option. If performance is a priority or if your content is not updating that often, use the 'Expert' (mod_rewrite) mode which speeds up the Time to First Byte (TTFB) by orders of magnitude. This is because it doesn't have to search for additional PHP handlers to parse the cached file. Instead, it writes the content as raw HTML and then serves the HTML by itself.

If you're using Nginx, use 'Simple' mode instead.

Making WP Super Cache work with Nginx

You can find your wordpress.conf file on your Nginx server in the following directory:

/home/username/nginx/example.com/wordpress.conf
The following lines are just a snippet from a whole wordpress.conf file.
###### rest of wordpress.conf above...
###
# only rewrite to the supercache file if it actually exists
if (-f $document_root$supercache_file) {
  rewrite ^(.*)$ $supercache_file break;
}

### stats
if ($request_uri ~* ^/(stats|doc|failed_auth\.html).*$) {
  break;
}

# all other requests go to WordPress
if (!-e $request_filename) {
  rewrite ^.*$ /index.php last;
}

See the following article for further information on using WordPress with Nginx:

See also

Internal links

External links

 

Did this article answer your questions?

Article last updated .