A compromised website is one of the few incidents a small business is likely to handle alone, usually on a weekend, usually without knowing whether the thing is really gone. The instinct is to find the bad file and delete it. That is the approach that produces the second call a week later. This is the order of operations that works.
How you will probably find out
Almost never by looking. The common routes are a browser warning when someone visits (Google Safe Browsing), your host suspending the account, a customer emailing to say the site redirected them somewhere strange, your email suddenly landing in spam everywhere because the server is sending it, or a search result for your own business showing pages you never wrote. If any of those happen, treat it as real until proven otherwise.
Step 1: do not start deleting
Before you change anything, capture the state. Take a full copy of the site files and database as they are, and keep it separate from your backups. It is evidence: it is how you work out what happened, when, and whether customer data was touched. Deleting the obvious file first destroys the only record of how it got there.
Then take the site offline or into maintenance mode. A compromised site is actively harming visitors and your sender reputation while you think.
Step 2: work out roughly when
You need an approximate date for one reason: it determines which backup is safe. Useful sources are file modification times, your host's access logs, when the Safe Browsing warning appeared, and your platform's update history. Be pessimistic. Attackers often sit quietly for a while before doing anything visible, so the first symptom is usually not the start.
Step 3: restore, do not clean
This is the part people get wrong, and it is worth being blunt. Restoring from a known-good backup is almost always better than cleaning. Cleaning means finding every change an attacker made, and a competent compromise is designed to leave more than one way back: a scheduled task, a modified .htaccess, an extra administrator account, PHP hidden in a file named like a cache or an image, a change buried in a theme or a second plugin. Miss one and you are reinfected, which is why the second and third cleanups happen.
Restore to a point comfortably before your estimated date, then immediately update everything before putting it back online. If you have no backup that predates the compromise, or no backup at all, cleaning becomes the only option, and at that point paying a specialist is usually cheaper than three failed attempts. That calculation is also the reason a tested backup is the single most valuable thing on this list.
Step 4: rotate every credential the site could reach
Not just the admin password. Assume everything on or reachable from that server is known to someone else: the database password, the hosting control panel and SFTP credentials, any API keys in configuration files, SSH keys stored on the server, mail-sending credentials, and payment or shipping integration keys. Reset the administrator accounts and delete any you do not recognise.
If the same password was used anywhere else, change it there too. This is the step most often skipped, and it is why some sites get compromised again cleanly after a perfect restore.
Step 5: close the way in before you republish
Putting the old site back without fixing the entry point just restarts the clock. The usual culprits are an out-of-date platform, plugin or theme, a weak or reused administrator password with no multi-factor authentication, a compromised update channel, or stolen hosting credentials. Patch to current, enable multi-factor on the admin login, remove plugins and themes you do not use, and take administrator rights away from accounts that do not need them.
Step 6: get the warnings lifted
Your site can be clean and still unreachable. If Google flagged it, request a review through Google Search Console once you have genuinely fixed it, because a premature request that fails costs you time. If your host suspended the account, they will usually want to see what you changed. If your domain or sending IP ended up on an email blocklist, that is a separate delisting process, and it is the reason your invoices stopped arriving.
Step 7: the question people avoid
Was personal information involved? If the site held customer accounts, order records, form submissions or anything beyond brochure content, you have to actually answer this rather than hope. Under PIPEDA, a breach of security safeguards creating a real risk of significant harm triggers notification to the Privacy Commissioner and to affected individuals, and every breach has to go in your breach register regardless of whether it met that threshold. A hacked site that processed orders is squarely in scope, and the notification rules are not optional because the incident felt technical.
Step 8: write the page nobody wants to write
Afterwards, two paragraphs: what happened, what you changed. Keep it with your IT documentation. The value is that the next person, possibly you in two years, knows what version you were on, which credentials were rotated, and what the entry point was. It also means that if it happens again you will know immediately whether it is the same hole.
What this means for your business
The difference between a bad afternoon and a bad month is decided before anything happens: whether you have a backup you have actually restored from, whether you know what credentials live on that server, and whether anyone owns updating the platform. With those three, a compromise is a restore and a rotation. Without them, it is an expensive investigation with an uncertain ending. Both outcomes cost money, but only one of them is predictable, and getting there is work we do with small businesses before the Safe Browsing warning shows up.