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.

When does WP-Optimize clear the page cache?

Full cache purge:

  • When changing/updating current themes and parent themes (of child themes)
  • When changing/updating current plugins
  • When turning off the cache feature in WP-Optimize
  • When editing widgets
  • When saving the customizer settings
  • When updating a menu
  • When Autoptimize purges its cache
  • When updating permalink structure
  • When changing cache settings
  • When updating string translations in WPML plugin
  • When updating the ‘posts_per_page’ option
  • When purging Avada theme’s fusion caches
  • When saving any of GetWooPlugins’ settings (Premium)

This can be changed by hooking into the filter wpo_purge_cache_hooks. E.g.

// Add a new action that will trigger a cache purge
add_filter( 'wpo_purge_cache_hooks', function( $actions ) {
    $actions[] = 'my_custom_action';
    return $actions;
} );

Partial cache purge:

  • When you publish new content or update/edit existing content, the cache for that post/page will be cleared, as well as associated content (category archives, blog archives)
  • When comments are approved, or their status changes
  • When terms are created or updated
  • When changing/updating stock quantity of WooCommerce product or product variation
  • When updating the ‘page_on_front’ option
  • When updating ‘page_for_posts’ option
  • When updating the ‘URLs to exclude from caching’ WP-Optimize caching configuration
  • When trashing a post
  • When running importers
  • When WooCommerce product is on sale (Premium)

 

How to install the WP-Optimize plugin

Installing the WP-Optimize plugin is as easy as 1-2-3. Here’s a quick guide to get you started.

Table of contents:

Installing WP-Optimize free

In order to install the free version of the WP-Optimize plugin:

1. Log in to your WordPress admin dashboard.

screenshot-highlighting-the-add-new-plugin-button

2. In the left-side menu bar, navigate to Plugins and click on Add New Plugin.

3. Search for ‘WP-Optimize’ using the search bar on the top right corner of your screen.

4. Look for the WP-Optimize plugin and click Install Now.

screenshot-highlighting-the-add-new-plugin-button

5. Once the installation is completed, click on the Activate button to activate the plugin.

wp-optimize-installation-screen-with-activate-button-highlighted

Once you have installed and activated the free version of WP-Optimize, you can learn how to set it up and for current and future use in just a minute or so. By setting up and carrying out these tasks, it can help your site to improve its speed and ranking score, as slow sites will suffer badly in search engine rankings if they are not routinely optimized.

Just follow the simple instructions in the below video to help continually optimize your site’s databases, images, caching and minify settings using the free version of WP-Optimize.

Installing WP-Optimize Premium

If you already have the free version of WP-Optimize installed on your website, you don’t need to worry about anything as it will be automatically deactivated. 

You also don’t have to install the free version to run WP-Optimize Premium.

To download and install WP-Optimize Premium on your WordPress site, just simply:

1. Go to our website to buy the WP-Optimize Premium plugin.

2. Download the WP-Optimize Premium from the link in your confirmation email or from your Account page.

3. Log in to your WP admin dashboard, then go to Plugins > Add New Plugin.

4. Press the Upload Plugin button near the title at the top of the page.

wordpress-add-plugins-page-highlighting-upload-plugin-button

5. Click on Choose file and select the WP-Optimize Premium plugin file that you downloaded.

wordpress-upload-plugin-screen-with-choose-file-button-highlighted

6. Upload and install the plugin by clicking on the Install Now button.

wordpress-upload-plugin-screen-with-install-now-button-highlighted

7. Click on Activate Plugin to activate WP-Optimize Premium.

plugin-installation-screen-with-activate-plugin-button-highlighted

You’ll be prompted to enter your WP-Optimize credentials to link your site to licences. This will verify your purchase and enable the plugin to receive automatic updates. Enter the required details and click Connect.

enter-details-to-connect-wp-optimize-premium

Have questions?

Feel free to address any doubts regarding the purchase by submitting a pre-sale question. We are here to assist you at every step of your journey. 

You can also refer to our FAQs page for assistance with any issues or inquiries that may arise. 

Still haven’t found the information you need? Premium customers can get help from our expert developers through the Customer Support Form. We answer 94% of inquiries within 24 hours!

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.