Manually editing the WordPress wp-config.php file to add WP_CACHE code for caching plugins

Home Forums BulletProof Security Pro Manually editing the WordPress wp-config.php file to add WP_CACHE code for caching plugins

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #33383
    AITpro Admin
    Keymaster

    The BPS Pre-Installation Wizard will display this error message below when the Setup Wizard AutoFix (AutoWhitelist|AutoSetup|AutoCleanup) feature is unable to find the wp-config.php file for a website when automatically setting up other plugins with BPS.

    Error: The Pre-Installation Wizard is unable to add the [Plugin Name] WP_CACHE code in your wp-config.php file.
    A wp-config.php file was NOT found in your WordPress website root folder. If you have moved your wp-config.php file to another folder location then you will need to either move the wp-config.php file back to its default WordPress folder location and run the Pre-Installation Wizard again or manually edit your wp-config.php file and add the [Plugin Name] WP_CACHE code. Click this link for the steps to manually edit your wp-config.php file: Manually Edit the WordPress wp-config.php file

    Specific WP_CACHE wp-config.php code that each plugin uses by plugin name:

    Note: All plugins are listed that are automatically setup by the Setup Wizard AutoFix feature, but not all plugins require WP_CACHE wp-config.php code and only require htaccess code setup with BPS.
    WP Super Cache Plugin:

    define('WP_CACHE', true); //Added by WP-Cache Manager
    define( 'WPCACHEHOME', '/add-your-actual-website-path-to/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    W3 Total Cache Plugin:

    /** Enable W3 Total Cache */
    define('WP_CACHE', true); // Added by W3 Total Cache

    Comet Cache Plugin (free & Pro):
    define( 'WP_CACHE', true );

    WP Fastest Cache Plugin (free & Premium):
    Does not require WP_CACHE wp-config.php code unless the wp-postviews plugin is installed.
    define('WP_CACHE', true); if the wp-postviews plugin is installed.

    Endurance Page Cache Must-use Plugin:
    Does not require WP_CACHE wp-config.php code.

    WP Rocket Plugin:
    define('WP_CACHE', true); // Added by WP Rocket

    LiteSpeed Cache Plugin:
    define('WP_CACHE', true);

    Additional Plugins that were tested and that do not require automated Setup Wizard AutoFix setup:

    Cache Enabler Plugin:
    define('WP_CACHE', true); // Added by Cache Enabler

    Hyper Cache Plugin:
    define('WP_CACHE', true);

    Cachify Plugin:
    The Cachify plugin does create htaccess code, but we were unable to add Cachify to the Setup Wizard AutoFix feature due to a problem with the htaccess code that is automatically created by the Cachify plugin. Currently the Cachify plugin htaccess code is not valid. When that problem is corrected in the Cachify plugin we will add the Cachify plugin to the Setup Wizard AutoFix feature.

    Steps to manually edit your WordPress wp-config.php file:

    WP Codex Reference: https://codex.wordpress.org/Editing_wp-config.php

    1. Use FTP or your web host control panel file manager and open your wp-config.php file.
    2. Edit your wp-config.php file and add the specific wp-config.php code for whichever plugin you are setting up using the BPS Setup Wizard. Add your specific plugin’s wp-config.php WP_CACHE code in the location shown highlighted in Yellow in the example wp-config.php file code below.
    3. Save the wp-config.php to save your editing changes. Note: If you have BPS Pro installed then the wp-config.php file will be autorestored and sent to Quarantine. Go to Quarantine and restore the wp-config.php file.

    <?php
    define('WP_CACHE', true);
    /**
    * The base configurations of the WordPress.
    *
    * This file has the following configurations: MySQL settings, Table Prefix,
    * Secret Keys, WordPress Language, and ABSPATH. You can find more information
    * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
    * wp-config.php} Codex page. You can get the MySQL settings from your web host.
    *
    * This file is used by the wp-config.php creation script during the
    * installation. You don't have to use the web site, you can just copy this file
    * to "wp-config.php" and fill in the values.
    *
    * @package WordPress
    */
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.