Cache Requirements and Setup

The page caching engine in SWIS Performance will generally attempt to auto-configure your site. But there are a few things that can require manual intervention, especially when it comes to updating your site's wp-config.php file and ensuring permalinks are setup. So let's walk through what SWIS normally does, and what could cause problems.

advanced-cache.php

The first two things are needed to enable the caching support that is built into WordPress. First, SWIS needs to be able to copy it's advanced-cache.php file into the wp-content/ folder. This is the code that checks for cached files, and essentially "short circuits" the rest of the WordPress loading process: plugins, themes, etc.

If the wp-content/ folder is not writable, naturally this needs to be fixed, or you can copy the advanced-cache.php file manually from the swis-performance/assets/ folder. Also, if an advanced-cache.php file already exists, from an old plugin or even another cache plugin, SWIS may not be able to overwrite the existing file.

wp-config.php and WP_CACHE

Second, WordPress needs to know that it should try to run advanced-cache.php before starting the normal loading process, and this is done by defining WP_CACHE in the wp-config.php file. This file lives in the "root" of your WordPress install, or in the top-level folder. As with the advanced-cache.php, if the wp-config.php file isn't writable, then this line can be added manually to the top of wp-config.php, but after the opening PHP tag. It would look something like this:

<?php
define( 'WP_CACHE', true ); // Added by SWIS Performance

/**
* The base configurations of the WordPress...

(Pretty) Permalinks

The Permalink settings in WordPress control your URL structure and make things look a little nicer. For example, https://example.com/?p=123 vs. https://example.com/about-me/

SWIS will work with any permalink structure/setting except "Plain", but if SWIS seems to be stuck on this, there are a few things you can try:

  1. Disable the Page Caching option, and then re-enable. This forces SWIS to re-setup it's cache configuration.
  2. Change your Permalink structure to a different style, save the settings, and then set it back and save once more.
  3. Purge any other cache on your site, especially object/database caches, as those can make it appear "broken" when things are just fine.

File Permissions

The wp-config.php and advanced-cache.php files don't have to remain writable, only during setup. But SWIS does need a folder to store cache files. By default it will store these in wp-content/swis/ (or relative to whatever your custom content folder is). If you need to use a different folder, you can define SWIS_CONTENT_DIR in your wp-config.php.

If you run into any other issues, just send us an email and we'll be glad to help!

Still need help? Contact Us Contact Us