A customer messages you: “I clicked your website on Google and it took me to a gambling site”. You open it on your computer and it looks fine. Or your hosting provider emails to say they’ve found malicious code and suspended the account. It’s one of the worst messages a business with a website can get, and it usually arrives at the worst possible time.
If it’s happening to you right now, take a breath: almost every hacked WordPress site can be cleaned and recovered. Here’s what to do, in order, how to tell whether you’ve really been attacked, and what to change so it doesn’t happen again.
How to tell if your website has been hacked
Many attacks are designed so the owner doesn’t notice. These are the most common signs:
- Strange redirects. Visitors coming from Google or from a phone end up on a gambling, pharmacy or adult site, while you, typing the address directly, see your normal website.
- A warning from Google or the browser. Search results show a notice that the site may be hacked, or Chrome shows a red warning screen before loading it.
- Pages on Google that aren’t yours. If you search site:yourdomain.com and see pages in Japanese or about products you don’t sell, someone has created them on your site.
- Administrator users you don’t recognise in the WordPress dashboard.
- Emails from your hosting provider about malware, unusual resource usage or a suspended account.
- Your emails start bouncing or landing in spam, because the server is being used to send junk mail.
If your site is set up in Search Console, check the Security issues report. If Google has detected a problem, it appears there with examples of affected pages.
What to do in the first hour
- Don’t start deleting files blindly. Before touching anything, take a full copy of the files and the database as they are. It helps to find out how the attackers got in, and lets you roll back if something goes wrong.
- Change every password from a computer you know is clean: WordPress users, the hosting control panel, FTP or SFTP, the database and email. If any of them is reused on other services, change it there too.
- Tell your hosting provider. Many keep backups from previous days and have tools to scan the server. Ask them how far back their backups go.
- If the site is attacking your visitors (redirects, downloads, red warnings), put it in maintenance mode while you clean it. A site that’s closed for a few hours is better than infected customers.
- Write down what you see: dates, screenshots, and who warned you about what. You’ll need it if you have to account for the incident later.

Cleaning the site: restore or disinfect
There are two routes, and they’re often combined:
| Restore a clean backup | Clean the current installation | |
|---|---|---|
| When it makes sense | You have a backup from before the attack and roughly know when it started | There are no backups, or they’re all from after the infection |
| What you lose | Anything changed on the site after that backup (orders, posts, form entries) | Nothing, if it’s done properly |
| The risk | If the hole they came in through isn’t fixed, they’re back within days | Missing a hidden infected file, so the attack comes back |
Either way, a proper clean-up includes the same steps:
- Reinstall WordPress, the theme and every plugin from their official sources, not from the files on the server.
- Delete any plugins and themes you don’t use, and anything downloaded from “free premium plugins” sites.
- Review the user list and remove any administrators you don’t recognise.
- Check wp-config.php, .htaccess and the uploads folder, which should never contain PHP files.
- Change the WordPress security keys (the salts) to log out every open session.
The official WordPress documentation has a guide covering these steps: FAQ My site was hacked.
After the clean-up: Google, customers and data protection
- Ask Google to review the site. If Search Console flagged a security issue, you can request a review from the same report once the site is clean. Until then, the warning keeps showing in search results and costs you clicks.
- If the site stored customer data (forms, orders, bookings, user accounts), this may be a personal data breach. Spain’s data protection authority, the AEPD, explains on its personal data breaches page (in Spanish) when it has to be reported: the deadline is 72 hours from when you become aware of it.
- Get free help if you don’t know where to start. Spain’s national cybersecurity institute, INCIBE, runs a free and confidential helpline, 017, which also covers businesses and the self-employed.
Why WordPress sites get hacked (and how to prevent it)
WordPress itself is secure. What gets attacked is almost always a neglected installation. These are the most common ways in, and what closes them:
| How they get in | What prevents it |
|---|---|
| Outdated plugins and themes with known flaws | Weekly updates and removing anything unused |
| Pirated (“nulled”) plugins or themes | Only using the official repository or buying from the developer |
| Weak or reused passwords, an “admin” username | Unique passwords, a password manager and two-factor authentication |
| An old PHP version on the hosting | Keeping a supported PHP version |
| Nobody checks the site for months | Automatic off-server backups and someone keeping an eye on it |
The last row is what we see most in Gran Canaria: websites built years ago that worked fine and that nobody has touched since. When someone finds an outdated plugin, the owner doesn’t notice until a customer tells them. And if your site is slow for no obvious reason, it’s worth checking: sometimes the cause is the same.
Prevention costs less than a clean-up
Cleaning a hacked site takes hours of technical work, and then there’s what doesn’t show up on the invoice: days without a website, customers who lose trust, and Google rankings that take time to win back. That’s why we push website maintenance so hard: updates, daily backups and monitoring, so an attack is caught on day one or never happens. If you want to know what it includes, we explain it in this article on website maintenance.
Has your website been hacked?
If your WordPress site shows any of these symptoms, get in touch and we’ll look at it with you. We’re a web design studio in Las Palmas and work with WordPress every day: see our web development services, request a quote here or, if it’s urgent, message us directly on WhatsApp (+34 613 09 41 47).










