i migrated a site from my development server to the clients Hosting (IONOS). All URLS are changed of course.
After activating Powered Cache i have this warning in the Backend:
Page Cache is not working, because:
define("WP_CACHE", true);
?is not found in wp-config.php.
I added the line, also tried different positions inside the wp-config.php, but the warning is still there and also no caching happens on frontend.
Best,
Torsten
I always use Roots Bedrock for WP installs, which means that the WP_CACHE constant is defined in config/application.php rather than in wp-config.php.
For this reason, the WP_CACHE constant is already defined when LS tries to update wp-config.php. This will lead to a fatal when activating / deactivating the plugin or when deactivating page caching owing to the constant being defined again inside wp-config.
I’ve searched the forums and found this post from a couple of years ago. It looks like a resolution to this issue was never reached. I don’t think the proposed solution in that thread would work as intended, but @designyourcode is on the right track.
Could you update the logic so that nothing is written to wp-config if WP_CACHE is defined at runtime, but not declared in wp-config.php (i.e. defined elsewhere, such as in application.php)?
Thanks for your help!
]]>I am new to this. I have made several plugin updates after 2 years of no activity. Something is wrong with some plugins I assumed so I tried uninstalling each one. The Super Cache is giving me problems. I did delete the Cache before uninstalling this plugin.
The issue is each page I navigate to says define( ‘WP_CACHE’, true ) at the top. I need to fix this. Also the site is not functioning the same anymore.
Any help would be appreciated. Please I have small knowledge of html.
]]>After updated W3TC to 2.2.2 version, in Compatibility Check (on the Dashboard page), I have this :
WP_CACHE define: Not defined
But I have checked in wp-config.php, the line below is still there:
/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache
Very strange, don’t it ???
Thanks for help.
After updated to 2.2.2, in compatibility check (on the Dashboard page), I have this :
WP_CACHE define: Not defined
But I have checked in wp-config.php, the line below is still there:
/** Enable W3 Total Cache */
define('WP_CACHE', true); // Added by W3 Total Cache
Very strange, don’t it ???
Thanks for help.
I have recently started having a problem with CF7. When using a cache plugin (any), it causes the form to work only after the second time. The first time the message [response] appears correctly and that for about 1 sec. the form empties and did not work. The second time I fill out the form everything works.
After that it appears in the URL:
#wpcf7-f8810-p291-o1
URL example:
example-domain.com/contact/#wpcf7-f8810-p291-o1
Yesterday I contacted one of the cache manufacturers. They then looked in wp-config.php to see if the code:
define( ‘WP_CACHE’, true );
is present. It was. The problem is not with a cache plugin, but with CF7 itself. he told me.
So the problem should be
‘WP_CACHE’, true and CF7 are located.
I only mention the website to the CF7 support team.
***translated with deepl***
Hope it is understandable.
]]>However, I’m not using the page caching feature here (since it’s members only and we don’t want any pages to be cached in this case). I am using the other features of W3 Total Cache though and prefer it to the alternatives.
If the Page Caching feature of W3 Total Cache is disabled, should the WP_CACHE setting still be set to true? I’m guessing it’s added as long as the plugin is active, even though the caching feature is disabled.
I know I could remove the setting, but I assume it would just get added back eventually.
Is there a way I can tell W3 Total Cache not to add the WP_CACHE setting?
Is there a reason it’s needed even though the page caching feature is not enabled?
]]>