Imagine waking one morning and finding your WordPress dashboard defaced, users missing, strange redirects, or even Google warnings saying “This site may be hacked.” That sinking feeling is real. If you have a hacked WordPress site, this guide will walk you through how to recover hacked WordPress site, clean hacked WordPress site, and prevent future incidents.
Whether you’re a beginner or more advanced user, I’ll show you practical, human-friendly steps—and along the way I’ll point you to reliable tools and hosting you can trust (like Hostinger) to reduce your risk.
1. Can a WordPress Site Be Hacked? (And How to Know)
Short answer: yes—WordPress sites can and do get hacked all the time. It’s one of the most popular CMS platforms, and that makes it a big target.
Why WordPress sites get hacked often:
-
Outdated plugins or themes with vulnerabilities
-
Weak passwords or “admin” usernames
-
Using nulled or pirated themes/plugins
-
Lack of server or hosting hardening
-
Not running security monitoring or backups
So, how to check if WordPress site is hacked? Here are telltale signs:
-
You can’t login (i.e. “wordpress site hacked can’t login”)
-
Your homepage shows unfamiliar content or redirects
-
Google search results show “This site may be hacked”
-
Unknown users or administrators exist
-
Files changed (dates, sizes) or new suspicious files
-
Spam links or injection in content
-
Emails about cleanup, blacklisting, or security alerts
If you suspect a hacked WordPress site, act quickly to limit further damage.
2. Signs Your WordPress Site Has Been Hacked
Here are common red flags:
| Symptom | What It Could Mean |
|---|---|
| “403 Forbidden” or “500 Internal Server Error” suddenly | Could be code injection or .htaccess tampering |
| Your SEO rankings crash | Google penalized you or removed indexing |
| Visitors get popups or phishing pages | Malware injecting malicious code |
| Admin user disappeared or changed | Hacker removed your access |
| Suspicious outgoing emails | Your site may be used as spam relay |
These are all signs that you need to restore hacked WordPress site as soon as possible.
3. What to Do Immediately After Discovery
When you realize your WordPress site is hacked, time is of the essence. Here’s a prioritized checklist:
-
Put site in maintenance / offline mode (if possible)
Prevent further damage or visitor exposure. -
Take a full backup (files + database)
Even though it’s compromised, you want a snapshot before making changes. -
Scan for malware / check logs
Use tools like Wordfence, Sucuri, or built-in host malware scanners.
(Hostinger’s Malware Scanner automatically finds and removes threats) -
Change all passwords & revoke user sessions
Admin, FTP, database, hosting panel—everything. -
Contact your hosting support
They may help clean up or have special tools. Good hosts also have backups and security teams. -
Check Google Search Console / Security Tools
For warnings or blacklisting notifications.
These initial steps help you contain the damage before deeper cleanup.
4. How to Fix and Recover a Hacked WordPress Site
This is the “meat” of restoring your site. It’s often technical, but manageable with care.
4.1 Use a malware scanner & remove malicious code
Run a full site scan. Identify files with injected code, base64 blobs, suspicious PHP, etc. Remove or replace them.
Hostinger’s built-in malware scanner can help in detection and removal.
You can also manually review wp-config.php, .htaccess, wp-content/themes, wp-content/plugins.
4.2 Reinstall WordPress core, plugins, and themes
Delete core WordPress files (except wp-content and wp-config.php) and replace them with fresh copies.
Reinstall plugins and themes from trusted sources. Avoid nulled themes.
4.3 Disable PHP execution in upload directories
This prevents new backdoors being run. Add an .htaccess in wp-content/uploads/ with:
<Files *.php>
deny from all
</Files>
Hostinger’s guide suggests exactly that to clean hacked WordPress site safely.
4.4 Remove unknown users & roles
Check your Users list. Delete or demote any user accounts you didn’t create.
Reset roles for trusted accounts.
4.5 Clean database — search & remove injections
Use tools like phpMyAdmin or plugins to search for suspicious content injections (e.g. “eval(”, “base64_decode”).
Be very careful—modifying database wrongly can break pages.
4.6 Update passwords, salts, and secret keys
In wp-config.php, regenerate AUTH_KEY, SECURE_AUTH_KEY, etc.
Change all passwords again (database, FTP, hosting, WordPress).
4.7 Restore from clean backup (if available)
If you have a backup from before the hack and you’re confident it’s clean, restore it.
Then apply security patches before bringing it live.
4.8 Monitor logs & set up alerts
Enable plugin or server error / access logs. Tools like Wordfence or real-time security plugins can alert you when new threats appear.
Once those steps are done, you’ve effectively restored hacked WordPress site.
5. Post-Recovery: Hardening & Prevention
After you’ve fixed the hack, your job shifts to defense—don’t let this happen again. Below are essential practices.
Key Hardening Measures
-
Use a secure web host with proactive protection (more on that soon)
-
Keep WordPress core, themes, and plugins always updated
-
Remove unused themes/plugins entirely
-
Enable two-factor authentication (2FA) for all admin logins
-
Limit login attempts and block brute-force attacks
-
Use a Web Application Firewall (WAF)
-
Use a CDN to mitigate DDoS and offer caching
-
Proper file permissions (e.g.
wp-config.php = 400,wp-content = 755) -
Turn off file editing in
wp-config.phpfor extra safety -
Disable XML-RPC if you don’t need it
-
Hide WordPress version info and disable directory browsing
-
Schedule periodic site scans and backups
-
Monitor user activity logs
This security checklist is widely recognized as part of best practices.
6. Choosing a Secure Host (Why I Recommend Hostinger)
Even with perfect site security, if your hosting is weak, your defenses collapse. A quality host offers:
-
Firewall, DDoS protection, auto malware scanning
-
Automatic backups, staging environments
-
SSL certificates
-
24/7 monitoring
-
Fast servers and good infrastructure
Hostinger is a hosting provider I feel confident recommending:
-
They offer automatic malware removal, firewall, and robust security architecture
-
They include free SSL certificates and backup systems
-
Their WordPress plans are optimized for security, speed, and uptime
If you sign up through my link (affiliate), you will get 75% Mega Discount with additional 3 free month and also it helps me maintain the site—and you’ll still get full performance and security. But only do so when you’re confident in your host choice.
7. FAQs
Q. What to do if WordPress site is hacked?
A. Immediately take the site down (or maintenance), backup, scan for malware, change credentials, clean, reinstall core, update everything, monitor, then harden. Follow the steps above.
Q. How to know if your WordPress site has been hacked?
A. Look for login issues, strange redirects, Google warnings, unknown content, missing users, or unusual spikes in traffic logs.
Q. Why WordPress sites get hacked so often?
A. Because of weak plugins/themes, outdated software, common admin URLs, weak passwords, and bad hosting security.
Q. How to fix hacked WordPress site?
A. Use malware scanners, reinstall WordPress core, clean plugins/themes, drop malicious database entries, reconfigure .htaccess, and patch everything.
Q. Can a WordPress site be hacked if I use a strong host?
A. Yes—but a strong host drastically reduces risk. The host protects the server layer; you still need application-level security.
Q. WordPress site hacked — can’t login: what now?
A. Use FTP or host file manager to disable plugins or revert to default themes. Also check user table via database, or use emergency admin creation commands to regain access.
8. Conclusion
A hacked WordPress site is stressful, but with calm, methodical steps, you can clean hacked WordPress site, restore hacked WordPress site, and come back stronger.
Here’s your action plan:
-
Immediately isolate the site and back it up
-
Scan, fix, and restore
-
Harden security with best practices
-
Migrate to a trusted, secure host (consider Hostinger)
-
Monitor continuously
check out our Free AI Tools Website—we offer smart tools to help you with content, SEO checks, and site diagnostics. (It’s on me!)
Need help with a real hacked site (log files, peculiar behavior)? I’m happy to go deeper with you.


