Conflict with iThemes’ Security?
-
For quite some time I’ve been noticing several of the websites we look after having a periodic issue.
Sometimes, seemingly at random we’d see the error on WP Super Cache’s Settings page: (And annoyingly ONLY there.)
WP_CACHE constant added to wp-config.php If you continue to see this warning message please see point 5 of the Troubleshooting Guide. The WP_CACHE line must be moved up.
and then after refreshing the page we’d see:
Warning! WP Super Cache caching was broken but has been fixed! The script advanced-cache.php could not load wp-cache-phasel.php. The file /srv/users/xxxxxx/apps/production/public/w-content/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.
Problem is the issue would reoccur again within 24 hours at times.
Looking in wp-config for the WP_Cache constant we see that it’s been placed within a section of code that’s in use by iThemes’ Security. eg:
Previous:
<?php // BEGIN iThemes Security - Do not modify or remove this line // iThemes Security Config Details: 2 define('WP_CACHE', true); define( 'DISALLOW_FILE_EDIT', true ); // Disable File Editor - Security > Settings > WordPress Tweaks > File Editor // END iThemes Security - Do not modify or remove this line ...
I believe iThemes’ Security is continually stripping out the WP Super Cache constant that’s in it’s section and breaking WP Super Cache as a result.
eg:
Hey! That’s my section! You can’t put that here! <erase, erase, erase>
iThemes’ SecurityI have moved the lines to the end of the wp-config.php file and I *think* this will solve the issue for us (will be confirmed tomorrow) but this seems to be an “out of the box” compatibility problem between iThemes’ Security and WP Super Cache
Current:
... define('WP_CACHE', true); define( 'WPCACHEHOME', '/srv/users/serverpilot/apps/production/public/wp-content/plugins/wp-super-cache/' ); /** Sets up WordPress vars and included files. */ require_once ABSPATH . 'wp-settings.php';
The page I need help with: [log in to see the link]
- The topic ‘Conflict with iThemes’ Security?’ is closed to new replies.