@techtechnik writes…
but when scanning my website it doesn’t show any infected file or posts…the site is 100% clean with no malicious files.
@tgunasekhar writes…
I wish you were right, at least in that way we would be able to solve the problem. But it is not true. The infected files and the urls scanned by other antivirus including virustotal.com which is maintained by Google finds nothing.
Yes, malware can make sure that it only loads itself in certain scenarios. For example, some malware only loads itself when the visitor is arriving from a Google Search result. If you visit the page directly, the malware might not load itself. It works that way so that it’s harder to find out that you’re infected.
When using a caching plugin, the content of the pages is captured and stored by the caching plugin, which means that the malware can’t hide itself. As a result, you’re more likely to see the infected pages.
Caching plugins are better at exposing infected sites for that reason: they make it harder for the malware to hide itself.
ZenCache, WP Rocket, W3TC… all of these plugins are being actively developed by experienced developers. They have tens of thousands (or even hundreds of thousands) of users. If one of these caching plugins was truly infected, the issue would be found and fixed rather quickly (and the WordPress team would remove the plugin from the plugin directory until the security issue was fixed).
However, the problem is not with the caching plugins. The problem is with your specific site being infected with malware.