You should follow these steps:
- Install security plugins like WP security
- Re-install the latest version of WordPress
- Change password and user-ids for all your users
- Check your themes and plug-ins are up to date
If your WordPress site is hacked, here are the steps you can take to handle the situation:
- Assess the Damage: Determine the extent of the hack. Identify which files or areas of your site have been compromised.
- Take Your Site Offline: Temporarily take your site offline to prevent further damage and protect your visitors.
- Change Passwords: Change all passwords associated with your WordPress site, including your WordPress admin password, FTP passwords, and database passwords.
- Update WordPress and Plugins: Ensure that your WordPress installation and all plugins are updated to the latest versions. Outdated software can be vulnerable to hacks.
- Scan for Malware: Use security plugins or online scanners to scan your site for malware. Remove any malicious code or files that are identified.
- Restore from Backup: If you have a recent backup of your site, restore it to a clean state. Make sure to only restore files that you are certain have not been compromised.
- Investigate the Cause: Try to determine how the hack occurred. Look for vulnerabilities in your theme, plugins, or weak passwords. Address these issues to prevent future hacks.
- Implement Security Measures: Enhance your site’s security by implementing measures such as using strong passwords, limiting login attempts, installing security plugins, and using HTTPS.
- Monitor Regularly: Keep an eye on your site for any unusual activity or signs of hacking. Regularly update WordPress and plugins, and perform security scans to prevent future hacks.
- Seek Professional Help: If you’re unsure about any steps or if the hack is particularly severe, consider seeking help from a professional WordPress developer or security expert.
By following these steps, you can effectively handle a situation where your WordPress site has been hacked and work towards restoring it to a secure state.