How to resolve an error in advanced-cache.php

If you activate 2 caching plugins (or at least the functionality) at the same time, this might cause a fatal error and break your site.

Follow these instructions to recover your site:

  • Connect to your server via FTP (or an other way if you prefer).
  • Browse to the root of the WordPress installation, where you should have a file named wp-config.php.
  • Download this file and open it in a text editor, such as notepad (Windows) or textedit (Mac).
  • Locate the line define('WP_CACHE', true);, delete it, save the file and upload it back via FTP.
  • Then still via FTP, enter the folder wp-content and delete the file advanced-cache.php
  • You should now be able to reconnect to your administration.
  • Go to one or all of your caching plugins settings, and only keep 1 activated.

If the error comes back before you had a chance to do this:

  • Try the first part again, and before going to the admin, do the following:
  • Using FTP, browse to the folder wp-content/plugins, and rename the folders of all caching plugins (for example by adding a -).
  • Then go to Plugins in your administration, and make sure the cache plugins are deactivated.
  • Using FTP, browse to the folder wp-content/plugins, and rename the folders of all caching plugins back to their original names.
  • You can now reactivate the caching plugin of your choice.

Which web servers is WP-Optimize compatible with?

WP-Optimize is compatible with all web servers, including:

  • Apache
  • NGINX
  • Microsoft IIS
  • Litespeed
  • Lighttpd

However, only Apache makes it possible for a WordPress plugin to turn on Gzip compression and static caching headers; thus, on other webservers, WP-Optimize can only test and advise whether these beneficial features are active, but cannot itself turn them on.

I see garbage characters instead of a normal web site, how do I fix this ?

  • If a theme or its files use the call php_flush() or function flush() that will interfere with cache, making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.
  • Some hosting providers, such as GoDaddy or wordpress.com, provide their own caching solutions. This will often interfere with WP-Optimize’s cache, and could result in those garbage characters.
  • Using other speed plugins that force GZIP output can result in this issue. One example is the GZIP compression feature in the plugin “Far Future Expiry Header”, or the setting “enable compression” in the plugin PageSpeed Ninja, which are not compatible with WP-Optimize.

To find out if this is the issue, you can search the code for ob_gzhandler or gzencode. If any of those two strings is found (outside of WP-Optimize), it could be the source of the issue.

How do I enable/use page cache

Go to WP-Optimize -> Cache and enable caching

You’re good to go!

If you run an e-commerce, have a custom login page or any page that has dynamic content, you might want to exclude certain urls from the cache. See Excluding an url from the cache for more details.