My WordPress website has been hacked: what should I do?
Your website redirects to an unknown page, your hosting provider has suspended it or a visitor reports a warning. Before trying a series of fixes, you need to establish the scope of the problem, preserve useful information and organise the work. Here is an approach for a self-hosted WordPress website.
WordPressBy Julien BaillyText updated on 5 min estimated read

Key takeaway
Keep the warnings and a record of actions taken, contact your hosting provider and arrange to preserve the files, database and available logs. Cleaning up should include investigating the cause and checking the website before bringing it back online.
Record what is happening without jumping to conclusions
An outage or a rejected password alone does not prove a hack. Record what you can see: affected page addresses, the exact message, date and time, and device used. Keep warning emails and any screenshots you already have. Do not open suspicious downloads offered by a compromised page.
Prepare a short timeline: the last time the website worked normally, the first warning, any recent update and actions already tried. The discovery date is not necessarily the date of the intrusion. This record helps the person investigating choose their checks and avoids repeating actions without knowing their effect.
Contact your hosting provider and limit exposure
Report the incident to support with the domain and warnings received. Ask whether other websites on the account are affected, which logs are retained and which backups remain available. If the provider has suspended the website, clarify what is needed to reactivate it.
When visitors are exposed to a malicious redirect or a fake form, agree on a temporary access restriction with your provider or the person handling the incident. A maintenance page managed by WordPress does not establish that the rest of the hosting environment is inaccessible. Also clarify the impact on orders, forms and other services on the account.
Preserve the current state before restoring a backup
Request a copy of the files and a database export, dated and stored outside the publicly accessible area. Both are needed to represent a complete WordPress website. This copy of the compromised state is for analysis; it must not be presented as a clean backup.
Restoring a backup replaces data. Before starting, identify what has changed since the selected backup: orders, contact enquiries, accounts or posts. Plan how to preserve these with the person responsible for the work. Also check the copy's actual age and contents: a website that appeared to work could already have been infected.
Regain control of access
List the access required: WordPress administration, hosting account, file transfer, database and the email account used for password resets. Identify who holds each one and which are still available. Use a trusted device for recovery operations.
Rotating credentials, revoking sessions and removing unknown access must be coordinated with the clean-up. Changing only the WordPress password can leave other access active. After recovery, check each person's permissions and enable additional authentication where the service supports it. Never send a password through a public form or shared ticket.
Clarify what the clean-up covers
Before agreeing to work, ask what will be examined and delivered. The scope may include files, database content and settings, accounts, plugins, the theme and the hosting environment. The method depends on the access available and the extent of the problem: targeted repair, controlled restoration or rebuilding.
Ask for confirmed findings to be distinguished from hypotheses. Which files or settings were corrected? Which entry point was identified? Which checks remain impossible without logs? A recently publicised vulnerability is not enough to explain your case. If the cause is uncertain, the report should say so and describe the measures chosen to reduce the risk.
Check website functions and address Google warnings
Prepare a list of journeys to check after the work: homepage, important pages, sign-in, forms and checkout if you use WooCommerce. A suspicious message disappearing from the homepage does not describe the condition of the whole website. Also agree on how to report any new anomaly.
If Google flags a problem, consult the Security Issues report in Search Console. The addresses shown are examples, not necessarily a complete list of affected pages. Once all reported issues have been fixed, a review request can be submitted with documentation of the actions taken. The removal of a warning and changes to search visibility then depend on the systems involved; neither is immediate or guaranteed by the clean-up.
Information to prepare before an intervention
To prepare our first discussion, I start with a short timeline. A fictional example: the website was working at the last check, a visitor then reported a redirect, and the hosting provider subsequently suspended access. The times and actions already tried help separate what has been observed from what still needs checking.
A specific enquiry helps scope the diagnosis without requiring you to collect technical data you are unfamiliar with. You can gather the following information; simply indicate anything you do not have. Access credentials and private files will be exchanged later through a channel we agree on together.
- The affected domain, hosting provider and number of websites on the account.
- The symptoms, discovery date and warnings already received.
- Actions tried and the previous provider's contact details, if useful.
- The availability of access and backups, without sharing their secrets.
- The functions essential to your business and constraints on bringing the website back online.
Sources and references
Documentation consulted when writing this guide. Advice and procedures should be adapted to your own context.
