How To Configure WP Super Cache So It Works With WP eStore

WP Super Cache is a great plugin which helps speed up your site yet can conflict with other plugins not unlike W3 Total Cache.

If you have the WP eStore plugin activated you’ll need to edit some code in your WP Super cache files in order to make the plugins work properly together. What i mean by this is you’ll need to add a small block of code to the Super Cache plugin file so your eStore is cacheable and fast like the rest of your site.

You will need to copy this code from the tips & tricks website. A link to this code will appear in your WordPress dashboard after you have installed both WP eStore & WP Super cache or W3 Total Cache.

Here’s the code that needs to be added to the wp-cache-phase1.php file

Image 1.

 

Caution: Always create full site backup before editing php code.

The same applies for all 3 Tips & Tricks plugins below which integrate perfectly together as they are all created by the same developer:

WP eStore
WP eMember
WP Affiliate Plugin

The reason i like these 3 plugins so much is because they’re all lightweight plugins which work well together. Having spent so much time on the various WordPress forums i see so many ongoing  issues with both shopping cart and eCommerce integration as well as problems with plugins conflicting with others. The video tutorials are also excellent.

First step: Navigate to the correct location where the code is to be added.

Login to your hosting accounts cPanel and find File Manager
Click File Manager and locate public-html
Then click through public-html →wp-content→plugins →wp-cache-phase1.php

Once you arrive at wp-cache-phase1.php open the php file by right clicking on it and click on code edit. The WordPress hosts i recommend all offer a built in editor which makes it very easy to add code to any php files when using your hosts cPanel tools.

The other way to add code to a php file would be by using FTP and an external editor like notepad++ but i think File Manager is easier.

Open the “wp-super-cache/wp-cache-phase1.php” file and search for the following line of code:

if ( wp_cache_user_agent_is_rejected() )

Second step: Paste the php code into the correct location

Open the php file and navigate to line 112

Paste the code in Image 1 above this line of code:

WP Super Cache
Here’s the before and after shots of what it should look like:
Paste the new block of code above the code in the red box

WP eStore - WP Super Cache
Below is the new block of code which has been pasted above the existing line of code on line 112

WP eStore - WP Super Cache - Code edit
Make sure you save the changes before closing File Manager.

If your using W3 Total Cache with any of these 3 plugins by Tips & tricks, you’ll need to add a different line of code.

Related Posts

    1. WordPress WP Super Cache Plugin Produces Lightning Fast Website Speed
    2. eStore WordPress Shopping Cart Is The Best Shopping Cart for WordPress

Comments

4 responses to “How To Configure WP Super Cache So It Works With WP eStore”

  1. Excuse me, I can’t log in to HQ site because my email used to purchase is hacked!

    I have just do as you guided, and below, is codes I type as you guide:

    define(‘TIPS_AND_TRICKS_SUPER_CACHE_OVERRIDE’, ‘1’;
    if ( isset( $_COOKIE[‘cart_in_use’] ) || isset ( $_COOKIE[‘eMember_in_use’] ) || isset ($_COOKIE[‘ap_id’]))
    {
    if ( isset( $wp_super_cache_debug ) && $wp_super_cache-debug ) wp_cache-debug( “wp_supercache file override for Tips and Tricks HQ plugin.”, 5 );
    return false;
    }

    I don’t know where I get error?

    I buy all three plugin:
    – WP eStore
    – WP eMember
    – WP Affiliate Plugin

    1. Brad Dalton Avatar
      Brad Dalton

      I suggest you use WooCommerce or Easy Digital Downloads instead.

  2. Dear Sir,

    I have just done as you said, but after add code to wp-cache-phase1.php, my site can’t load!

    For both backend & frontend page.

    Any idea?

    Thank for your help!

    1. Brad Dalton Avatar
      Brad Dalton

      I would ask the plugin developer as these are their instructions.

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.