How To Unhack Your WordPress Website


  1. Make a backup of your database
    1. Open up yoursite.com/wp-config.php and make note of the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST
    2. Download Adminer https://github.com/vrana/adminer/releases/download/v4.3.1/adminer-4.3.1-mysql-en.php
    3. Open up cPanel's file explorer or your favorite ftp program
    4. Upload the adminer file to yoursite.com/adminer.php
    5. Visit that url: yoursite.com/adminer.php
    6. Enter your credentials
    7. Click on the Export link on the left, the Save radio button, and then the Export button
    8. Save a copy of the database to your computer just in case!
  2. In the file explorer or ftp program move yoursite.com to yoursite.com.old
  3. Create a new directory called yoursite.com
  4. Unzip a fresh installation of WordPress there:
  5. https://wordpress.org/latest
  6. Copy wp-config-sample.php to wp-config.php and populate the four values as was done above: DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST
  7. Now reinstall each plugin and theme from /wp-admin/

This way you know for sure all of the files are clean again. It's worth it to go to the trouble.