My site was hacked or has malware

The process of page caching makes a copy of your site's content and stores it in HTML files. This process cannot distinguish between your normal content and hacked content. This means that if your site has been hacked, and malware or other malicious content is injected into your pages, that content will also end up in the cache files. For this reason security plugins may warn you about malicious code in the cache files. This does not mean that WP Rocket is the reason your site was hacked. It's simply caching the already hacked content. 

If your site has been hacked you should follow these steps: 

  1. Disable Preloading in WP Rocket
  2. Clear the cache to remove the infected files (this can also be done manually if needed)
  3. Deactivate WP Rocket
  4. Clean up the hack on your site
  5. Once your site is clean, then you may reactivate WP Rocket. 

If you need help to clean your hacked site, this is a good starting point: 
https://wordpress.org/support/article/faq-my-site-was-hacked/

Or hire a company that specializes in removing malware.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.