How to Handle a Hacked WordPress Website

Author:Lars Nyström
Updated:Apr 10, 2025

To address the situation of a hacked WordPress website, follow these organized steps:

  1. Assess Accessibility: Check if your site is still accessible. If not, there may be an issue beyond just a hack.

  2. Secure Your Accounts:

    • Change all relevant passwords immediately, including WordPress, email, and other services.
    • Enable two-factor authentication for added security.
  3. Identify Signs of the Hack:

    • Use FTP/SFTP to browse files; look for suspicious new files or directories.
    • Compare database tables with backups if available to detect changes.
    • Check core WordPress files for unauthorized modifications using MD5 sums or plugins.
  4. Check Login Logs: Review login logs for unusual activity, such as multiple failed attempts before success.

  5. Isolate the Issue:

    • For a single site, create a new, clean WordPress installation.
    • In a multisite setup, disable plugins and switch to a default theme to isolate the problem.
  6. Server-Side Investigation: If using a dedicated server, examine logs for unusual activity or IP addresses involved in the attack.

  7. Clean Up:

    • Remove suspicious files and restore backups if possible.
    • Rebuild the database from a backup if compromised.
  8. Prevent Future Hacks:

    • Update all plugins and themes.
    • Use security tools like Wordfence or iThemes Security.
    • Consider additional measures such as a web application firewall.
  9. Seek Support: Consult Esadax support for further assistance or additional security measures.