My WordPress site was compromised through a WP Rocket exploit, and I can't deactivate or update the plugin from the dashboard. What should I do first?
How do I recover my site if I can't disable WP Rocket?
Answers
Go around the dashboard using your hosting file manager or SFTP. Find wp-content/plugins/wp-rocket and rename the folder to wp-rocket-off. WordPress should then deactivate the plugin because it can no longer find it at the original path.
That stops the plugin, but it doesn't clean up an intrusion. Once you've secured the site, remove the old plugin folder and install a current version if you still want to use it.
Reply to this answer
Ask your hosting provider to help contain the compromise and scan the whole hosting account, not just the WordPress directory. Check the database and hosting cron jobs too. A backdoor outside the plugin can reinfect the site after you remove it.
Keep a copy of suspicious files or quarantine them for investigation rather than immediately deleting everything. Replacing WordPress core files with clean copies can help, but that alone won't address a compromised database, other plugins or server-level persistence.
Reply to this answer
Check the Users screen for administrator accounts you don't recognize. Also review each administrator's Application Passwords and revoke any that shouldn't be there. Once the site is clean, change passwords for WordPress and the hosting account.
Reply to this answer
WP Rocket support reported that the vulnerability was fixed in version 3.24.2. Contact their support if you can't update, but don't treat an update as proof the site is clean. After recovery, update WordPress, your themes and your other plugins as well.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Neat Spot:
WP Rocket may also have a cache file at wp-content/advanced-cache.php. Check with your host or the plugin's support before changing cache files if you aren't sure what they contain.