What to do if your WordPress site has been hacked
- Immediately change passwords. Your WordPress user account and all accounts with administrative permissions on the website. MySQL password for your website database and password for MySQL server administrator. FTP, if it used.
- Reinstall WordPress. Manually remove old one and install again (don’t forget preserve uploads folder). Download latest stable release from wordpress.org.
- Reinstall all plugins and theme. Use latest stable releases. Reinstall means remove all folders and files from previous installation. Don’t copy new files over files and folders that exists.
- Change security keys in the wp-config.php file. Get it from: https://api.wordpress.org/secret-key/1.1/salt/
- Make chmod 444 for wp-config.php.
- Check uploads folder(s) for php files. Remove it without doubt.
- Put .htaccess file to the uploads folder with string in it
php_flag engine off
- Check theme with Theme Check plugin.
Last posts from WordPress security blog
- Antispam protection for WordPress contact forms 10/22/2017
- Solving problem with incorrect IP address detection 10/17/2017
- WP Cerber 5.2 10/01/2017
- WP Cerber 5.1 09/11/2017
- WP Cerber 5.0 08/13/2017
WP Cerber 4.8.2