Constantly trying to update wp-config.php, error messages
-
Hi,
I have WP Super Cache Version 1.7.4 on WordPress 5.8. I’m having the problem that every time I log into the administrative dashboard, I get a warning message saying “Warning! Could not update [server path]/wp-config.php! WPCACHEHOME must be set in config file.”
The issue appears to be that I’ve set the permissions for wp-config.php to 400 in the interests of security, so that file is not writeable. If I temporarily reset the permissions to 600 or 644 and refresh, it tells me:
“Warning! WP Super Cache caching was broken but has been fixed! The script advanced-cache.php could not load wp-cache-phase1.php.
The file [server path]/wp-content/advanced-cache.php has been recreated and WPCACHEHOME fixed in your wp-config.php. Reload to hide this message.”
However, if I then reset the wp-config.php permissions to 400, the same series of error messages recur the next time I log in. It appears from the logs that the plugin is trying to update wp-config.php at least once a day, and can only do that if the file’s write permissions are enabled.
Why is it set up like that? I understand that for caching to work, the appropriate settings have to be created in wp-config.php, but once they’ve been created, continually recreating them seems peculiar, and having to have wp-config.php writable would seem to be a significant security issue, since that file contains database access credentials.
How can I set up the appropriate parameters for WP Super Cache without having this happen and without compromising site security?
- The topic ‘Constantly trying to update wp-config.php, error messages’ is closed to new replies.