1. Home
  2. Blog
  3. Backup and Restore

Restore a Hacked WordPress Site From a Clean Backup

Backup and Restore

October 17, 2026

When a WordPress site is hacked, a backup is the fastest way back to a working site. It is also easy to use badly. Restore the newest backup and you may restore the infection with it. Restore the right one and stop there, and you are back online with the same hole the attacker used, waiting for them to come back.

This guide is about how to restore a hacked WordPress site with Snapshotify in a way that actually ends the incident: choosing a clean restore point, restoring from a copy the attacker could not touch, and knowing exactly which files a restore deliberately leaves alone so you can check them yourself. One thing first, to be clear about what this is. Snapshotify is a backup and restore plugin, not a malware scanner. It gets your site back to a known state. Finding out how someone got in is a separate job, and this post shows where it fits.

Step 1: Do not restore yet. Back up the hacked state first

It sounds backwards, but the first backup you take after a hack should be of the hacked site.

Snapshotify’s restore guide is clear that a restore is not reversible. There is no undo. If the backup you restore turns out to be infected too, or turns out to be too old, the only route back is a backup of what you just replaced. A copy of the compromised state also preserves evidence for whoever investigates how the attacker got in.

Take a full-site backup and use the title to make its status impossible to miss. Snapshotify’s own advice is to name backups for the reason, not the date, because the date is already in the row. Something like “COMPROMISED, evidence only, do not restore” will still make sense in three months.

Before you go further, check free space. A restore needs roughly twice the archive size, because it extracts before it applies. Snapshotify checks this itself at the last non-destructive step, so a shortage leaves your site untouched, but knowing in advance saves a failed attempt.

Step 2: Work out when the compromise started

The hardest part of recovering from a hack is not the restore. It is picking the backup. The Snapshotify FAQ explains why: problems are often noticed late, and if every backup you hold is newer than the problem, they all contain it.

So before you choose, estimate when it began. Useful clues:

  • The first time anyone noticed a symptom: spam pages in search results, a redirect on mobile, a security warning in the browser, a complaint from your host.
  • Administrator accounts you do not recognize, and when they were created.
  • Plugins or files you did not install, and their modification dates.
  • Warnings from your host or from Google Search Console, which usually carry a date.

Then pick the newest backup from comfortably before that point. The backup list helps here: every row shows its title, contents, size, location and date, and the contents badges show whether that archive includes your database, media and core files. For a hack recovery you want a full-site backup, not a database-only one.

Accept that you will lose some recent work

A clean backup from two weeks ago means two weeks of posts, orders or comments are not in it. Make a list of what changed since that date before you restore, so you can re-enter content or reconcile orders afterwards. Losing two weeks of edits is recoverable. Restoring a backdoor is not.

Step 3: Restore from a copy the attacker could not reach

Where the backup lives matters as much as when it was taken. Snapshotify stores local backups in wp-content/uploads/snapshotify/ on your own server, and its storage settings carry a plain warning: local storage protects you from your own mistakes and from a bad update, but not from a hack that reaches the filesystem.

If an attacker had access to your files, treat local archives with suspicion. Prefer one of these:

  • A cloud copy. With Pro, backups can go to Google Drive, OneDrive or Dropbox. Each connection uses the narrowest scope that works (Google Drive’s drive.file, or a dedicated app folder on OneDrive and Dropbox), so the plugin only ever sees its own backup folder.
  • A copy you downloaded. Snapshotify’s Upload Backup takes an archive from elsewhere, including a copy you downloaded before rebuilding a server. It uploads in chunks, so large archives work within normal request limits, and once uploaded it behaves like any other backup in the list.

If the site is badly broken, you can also restore onto a fresh WordPress install (a clean server, or a new install on the same host) by installing Snapshotify there and uploading the archive. A restore onto a different domain is treated as a migration, with URLs rewritten throughout the database.

Step 4: Run the restore and watch it

From Snapshotify > Backups, choose the backup and select restore. Then stay on the page. Snapshotify says on screen not to close the tab during a restore: a backup can carry on in the background, but a restore is replacing the site underneath itself.

Here is what happens, in order:

  1. Prepare. The archive is extracted and checked, including the free space check. This is the last non-destructive step.
  2. Restore the database. If the backup came from a site with a different table prefix, table names are rewritten as they land.
  3. Repair prefixed keys. Role definitions and user capabilities are rewritten so nobody is locked out of wp-admin.
  4. Migrate URLs, only if the backup came from a different address.
  5. Restore files. Uploads, plugins, themes, other content, then core, last and in two phases.
  6. Finalize. Maintenance mode is lifted and the site comes back.

From the database step onward, visitors see a maintenance page instead of a half-restored site. If a restore crashes hard, the maintenance flag expires on its own after 30 minutes. If a step fails partway, the restore guide says to retry the same restore, because the steps are resumable and repeating them is safe.

Step 5: Check the files a restore deliberately leaves alone

This is the step most recovery guides skip, and it is where Snapshotify’s design helps you if you know about it.

Some files are never backed up or restored, on purpose. Snapshotify excludes them because restoring them onto a different server breaks sites. For a hack recovery, that list doubles as a checklist, because these files stay exactly as the attacker left them:

Not restoredWhy Snapshotify skips itWhat to check after a hack
wp-config.phpThe target keeps its own credentials and saltsUnfamiliar code, includes or changed settings
.htaccessServer specificRedirect rules or directives you did not add
.user.ini, php.ini, web.configAbsolute paths from the source hostauto_prepend_file lines or other unexpected directives
Drop-ins such as object-cache.phpBound to the source serverDrop-ins you did not install
Host-injected mu-pluginsLoad automatically and cannot be deactivated from wp-adminAnything in mu-plugins your host did not put there

There is one more detail worth knowing. The restore guide notes that core restore merges rather than wiping, because wiping wp-includes mid-restore would leave the next request with no WordPress to boot. The practical consequence: do not assume a restore deletes every file that was not in the backup. After the restore, look for files that should not be there, particularly PHP files in wp-content/uploads, and remove them. If you are not comfortable judging what belongs, this is the point to bring in a security professional.

Step 6: Sign back in, then change every credential

A restore replaces the users table, so your current session may no longer be valid. Snapshotify issues a re-login token valid for 30 minutes, so you land back in wp-admin. After that window, sign in with the credentials from the backup, which may be old passwords if the backup is old.

Then assume every credential the attacker could have seen is compromised, and change it:

  • Every administrator password, and remove any accounts you do not recognize.
  • The authentication salts in wp-config.php. Since that file is not restored, this is yours to do, and it signs out every existing session.
  • Your database password, hosting control panel, SFTP or SSH access.
  • API keys stored in plugin settings, since they live in the database the attacker could read.

Step 7: Close the hole before you relax

The site you just restored is the site that was hacked, minus the infection. If the way in was an outdated plugin, a weak password or a vulnerable theme, it is still there. Update WordPress core, every plugin and every theme. Remove plugins and themes you do not use. Then try to find the actual entry point, from your host’s access logs or with professional help, so you are fixing the cause and not only the symptom.

Step 8: Set up for next time

Once the site is clean and patched, take a new full backup and name it something like “Clean after recovery, patched”. Then fix whatever made this recovery harder than it needed to be:

  • Get backups off the server. Connect cloud storage, or at least download a copy regularly.
  • Schedule them. Scheduled backups run daily, weekly or monthly without anyone remembering.
  • Keep more history. Snapshotify’s retention guide suggests, for example, 7 or 14 copies with daily backups, or 6 with monthly ones. Keeping three daily backups means three days of history, and a compromise you notice on day four is unrecoverable from them.
  • Turn on notifications. At minimum, keep “backup failed” on, so a silently broken schedule does not surprise you during the next incident.
  • Test a restore on staging once. The docs call it the only way to know your backups work.

And one safety note from Snapshotify’s support page: never email a backup archive to anyone. Archives contain your whole database, including user accounts, password hashes, customer records and orders.

Where this sits in Snapshotify

Manual full-site backups, restores, upload and download are all in free Snapshotify. Scheduled backups, cloud storage on Google Drive, Dropbox and OneDrive, and automatic retention are Pro, and Pro comes with every other DaftPlug plugin under one membership. See pricing.

For the wider picture of why backups let people down at the worst moment, and how to avoid it, read why website backups fail when you need them most.