If your WordPress site is repeatedly getting infected, even after a fresh reinstall, the issue is almost always related to a vulnerable theme or plugin being reintroduced after setup. Infections like these often result in malicious code being inserted into critical files like wp-config.php
, which can redirect visitors to spam or malicious websites.
The root cause is typically the use of free third-party themes or plugins that are poorly coded, outdated, or sourced from untrusted locations. These components do not go through the same strict security reviews as WordPress core files, making them an easy target for attackers. Even if the core WordPress files are clean, reusing these insecure add-ons will quickly lead to reinfection. Unfortunately, this malware risk comes with the current state of the WordPress ecosystem.
At DataPacket, our servers include active protections like malware scanning, web application firewalls, and exploit pattern detection. However, once malicious PHP code is allowed to run from within the site due to a vulnerable plugin or theme, no amount of server-level protection can stop it. Infections introduced this way will bypass external defenses because they are injected from inside the application layer.
To prevent further infections, we recommend stopping the use of all third-party themes and plugins. Stick to default WordPress themes such as Twenty Twenty-Four and use only well-maintained plugins from the official WordPress plugin directory. Avoid restoring from old backups that may already contain malicious code. Ensure your WordPress installation, themes, and plugins are always up to date and regularly scan your site for unauthorized changes.
If you are having repeated WordPress infections, we recommend that you start fresh. You can wipe your site and reinstall WordPress from within your account control panel (Plesk).
For further help, please contact our support team.