WAF prepend not removed when plugin deactivated
-
Generally this isn’t an issue as we don’t tend to fully activate WF until a site is made live, but it seems that I found a small issue with deactivating WF to resolve a problem related to the firewall optimization.
It seems that because of a directory change when moving a site from staging to production, admittedly, when the optimized firewall should not have yet been activated, it caused problems due to attempts to load files from a directory that no longer exists.
Presuming it was related to one of two plugins not usually activated during staging, which another developer on the team had done for unknown reasons, both were deactivated. However, when deactivating WordFence, it does not seem to remove any rules created from the .htaccess file, nor from the .user.ini file. When made inactive, it should be cleaning up after itself. This would have confirmed much sooner, in this case, that the problem with the site when being made live was tied to WF, and not something else, saving me a bit of time.
But in general, when plugins are disabled/deactivated, they should be cleaning up changes they’ve made to a site, especially core loading mechanisms. I’ve not done an extremely extensive check of the code, but the only case I saw that appeared to remove the auto_prepend cases is tied to the Remove Extended Protection button under Firewall Options.
- The topic ‘WAF prepend not removed when plugin deactivated’ is closed to new replies.