Your WordPress Site Was Hacked: What to Do in the First Hour
Your WordPress site was hacked? Learn the essential steps to take in the first hour to contain the attack, protect your website, and prevent further damage.

Your WordPress Site Was Hacked: What to Do in the First Hour
If your WordPress site has been hacked, the first hour is critical. Delaying action or randomly deleting files can cause data loss, break your website, or leave a backdoor that allows the attacker to return.
If you notice unexpected redirects, unfamiliar content, unknown users, modified files, or security warnings, treat the website as a hacked WordPress site and follow these steps.
1. Don't Delete Files Randomly
One of the most common mistakes after a WordPress hack is immediately deleting files that look suspicious.
Some modified or unfamiliar files may be part of the attack, but deleting them without understanding the problem can break your website and remove useful evidence.
Before making major changes, create a backup of the website and database if possible.
2. Contain the Attack
If the website is still partially working, try to limit further access and damage.
Depending on the situation, you may need to:
Put the website into maintenance mode.
Restrict access to the WordPress admin area.
Disable unknown user accounts.
Temporarily disable affected plugins or services.
Limit access to sensitive areas of the website.
If your website handles sensitive information or user logins, stronger isolation measures may be necessary.
3. Change Your Passwords
Change the passwords for all accounts that could be connected to the website, not just your WordPress administrator account.
This may include:
WordPress Administrator accounts
Hosting account
FTP / SFTP
Database credentials
SSH
Cloudflare
Email accounts connected to website administration
Use strong, unique passwords and enable multi-factor authentication wherever available.
4. Check WordPress Users
Go to Users in your WordPress dashboard and review all existing accounts.
Look for:
Administrator accounts you don't recognize.
Recently created users.
Unexpected changes to email addresses or roles.
Administrator accounts that are no longer needed.
Don't simply delete a suspicious user and assume the problem is solved. An unknown administrator account may indicate that the attacker gained deeper access to the website.
5. Scan the Website Files
A hacked WordPress site often contains unauthorized changes to its files.
Check WordPress core files, plugins, themes, uploads, and configuration files.
Pay particular attention to:
Unknown PHP files.
Recently modified files.
Obfuscated or encoded code.
PHP files inside upload directories.
Code that creates users or executes commands.
Unexpected changes to
wp-config.phpor.htaccess.
However, don't delete a file simply because its name looks unusual. Verify what the file does before removing it.
6. Check the Database
A WordPress hack doesn't always affect website files only.
Attackers may modify the database to add:
Unauthorized administrator accounts.
Malicious JavaScript.
Spam links or content.
Unexpected WordPress settings.
Redirects or injected code.
The database should therefore be inspected as part of the cleanup process, especially user, settings, and content tables.
7. Review Plugins and Themes
Outdated, vulnerable, or abandoned plugins and themes can become an entry point into a WordPress website.
Review every installed plugin and theme and check:
Current versions.
Available security updates.
Unused plugins.
Unsupported plugins or themes.
The source of installed software.
Unexpected file modifications.
If the website is already compromised, don't blindly update everything without first understanding the state of the site. A controlled cleanup and update process is safer.
We can take care of it for you, saving you time and giving you peace of mind.
8. Check Your Backups
If you have a backup from before the attack, it may be extremely useful for restoring the website.
However, don't assume that every backup is clean.
Check:
When the backup was created.
Whether the files are clean.
Whether the database is clean.
Whether the compromise could already exist in the backup.
In some cases, restoring a verified clean backup and then updating and securing the website can be safer than manually cleaning thousands of compromised files.
9. Review Website Logs
If server logs are available, they can help you understand what happened.
Look for unusual activity such as:
Successful login attempts.
Unusual HTTP requests.
File uploads.
New user creation.
Unexpected file modifications.
Requests targeting known plugin or WordPress vulnerabilities.
Understanding how the website was hacked is important because cleaning the website without closing the original entry point can result in another compromise.
10. Don't Assume the Problem Is Fixed When the Site Works Again
Your website working normally again does not necessarily mean that the hack is gone.
An attacker may leave a backdoor that allows them to regain access later.
A proper WordPress malware removal and security process should include:
Identifying the entry point.
Searching for malicious files and code.
Checking the database.
Reviewing users and permissions.
Checking plugins and themes.
Reviewing server logs.
Changing credentials.
Updating WordPress components.
Checking for backdoors.
Adding ongoing security monitoring.
What Should You Do After the First Hour?
Once the immediate problem has been contained, don't stop after getting the website online again.
The goal is to prevent the same problem from happening again.
Your ongoing security plan should include:
Keeping WordPress, plugins, and themes updated.
Removing unused components.
Using trusted plugins and themes.
Protecting administrator accounts.
Using multi-factor authentication.
Maintaining regular backups.
Monitoring important file changes.
Monitoring website uptime and performance.
Monitoring SSL and domain status.
Performing regular security checks.
Is Your WordPress Site Hacked?
If your WordPress site is showing signs of a security breach, don't wait for the problem to become worse.
Pomnex helps individuals and businesses manage compromised WordPress websites by inspecting files and databases, identifying security issues, addressing the effects of a compromise, and improving ongoing protection and monitoring.
Your WordPress website needs more than occasional updates. It needs continuous monitoring and proactive protection to remain secure, stable, and reliable And this is what we provide at Pomnex.
[Start Now]
If your website has been hacked or is showing unusual behavior, have it inspected before making random changes that could make the problem more difficult to resolve.
Read Also : What Is WordPress Website Maintenance? A Complete Guide for Businesses
Related articles

wordpress-maintenanceWordPress Security
How to Fix the WordPress Critical Error After a Plugin Update
Did a plugin update trigger a critical error on your WordPress site? Learn how to identify the cause, check error logs, disable the faulty plugin, and safely restore your website.