-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
I am using roots.io Bedrock, which refactors the WP config and folder structure quite a bit. W3TC adds code to the top of wp-config.php, and that is not where my configuration is stored:
<?php
/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache
/**
* Do not edit this file. Edit the config files found in the config/ dir instead.
* This file is required in the root directory so WordPress can find it.
* WP is hardcoded to look in its own directory or one directory up for wp-config.php.
*/
require_once dirname(__DIR__) . '/vendor/autoload.php';
require_once dirname(__DIR__) . '/config/application.php';
require_once ABSPATH . 'wp-settings.php';I moved the constant to application.php, but W3TC re-adds the code to wp-config.php without realizing the constant is already defined. This results in a PHP error for redefining a constant.
PHP Fatal error: Uncaught Roots\\WPConfig\\Exceptions\\ConstantAlreadyDefinedException: Aborted trying to redefine constant 'WP_CACHE'. `define('WP_CACHE', ...)` has already been occurred elsewhere.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels