WordPress Site Recovery: How To Restore a Broken or Hacked Site Safely

WordPress Site Recovery feature image

The scariest part of WordPress site recovery is the first decision after the site breaks.

Your site may show a critical error, redirect visitors, lose wp-admin access, or even load a blank page. The wrong fix can make things worse. A blind restore can delete new orders. Random file changes can destroy evidence after a hack.

Reinstalling WordPress can hide the real problem without recovering the site.

TLDR: Start your WordPress site recovery by backing up the broken site, identifying what failed, and avoiding a blind full restore until you know what data could be lost. Use Recovery Mode for fatal plugin/theme errors, a clean backup for safe rollback, host/manual recovery when wp-admin is down, and WPRemote to make future restores faster and safer.

The safe pattern is simple: preserve the broken site, find the cause, then use the smallest clean fix that solves it.

This guide is for self-hosted WordPress sites where you control hosting, files, and the database. If your problem is a WordPress.com login, account, or ownership issue, use WordPress.com’s account recovery process instead.

WordPress dashboard context for recovery triage

Stabilize the site

Your first job is to keep your options open. Do not start by deleting plugins, reinstalling WordPress, or clicking restore because someone in a forum said it worked for them.

  • Pause all changes for now: Stop plugin updates, theme edits, PHP changes, database edits, cache purges, and test fixes.
  • Back up the broken site as it is: A broken site can still hold new orders, form entries, uploads, logs, and hack evidence.
  • Protect visitors if needed: Use maintenance mode or ask your host for a temporary 503, which tells browsers and search engines that the outage is temporary.
  • Write down the last change: Note the last update, plugin install, theme edit, migration, PHP change, warning email, or accidental deletion. An activity log can make this much easier after the fact.
  • Save recent business data first: Export new orders, customers, bookings, form entries, comments, memberships, and posts before any database rollback.

A restore replaces current data with older data. That may fix the visible error and quietly erase the most valuable thing the site did today. Before rolling back the database, export whatever recent content or business data you can still reach.

WordPress export options for saving recent content before rollback

Choose the least destructive recovery route

Treat the symptom as a clue. It does not always mean the whole site needs to be rolled back.

What you seeSafest route
Critical error after an updateUse Recovery Mode or disable the faulty plugin/theme. Do not restore the full database first.
wp-admin will not loadUse host tools, SFTP, File Manager, backup dashboard, or logs. Dashboard access is not the only access.
Redirects, spam pages, browser warnings, or unknown adminsTreat it as a hack. Contain, clean, rotate passwords, and verify any backup before restoring.
Failed update, broken layout, or bad editRoll back the changed part or restore a clean backup after saving recent data.
Missing files, database errors, or fresh install screenRestore files and database together. Check database details and table prefix.
No usable backupSalvage what remains from the host, old tools, staging copies, files, database tables, and public archives.

The important choice is not “restore or do not restore.” It is which restore path loses the least data and fixes the real problem.

Use Recovery Mode

Recovery Mode helps when WordPress hits a fatal error. A fatal error means WordPress stopped because a plugin, theme, code snippet, or PHP version conflict broke something it needed to run.

Recovery Mode is not a backup. It does not bring back deleted pages, repair a damaged database, or clean malware. It gives an admin a safer way into wp-admin so the broken part can be disabled or fixed.

Demo Recovery Mode notice showing a paused plugin
  • Find the recovery email first: Check the administrator inbox and spam folder for the WordPress Recovery Mode email.
  • Enter through the recovery link: Log in from that link, then look at the plugin or theme WordPress paused.
  • Fix the failed component: Deactivate, replace, update, or roll back the plugin or theme that caused the error.
  • Test before exiting Recovery Mode: Open the public site and wp-admin in a private browser window. Exit only when the error stays fixed.
  • Use file access if the email never arrives: In SFTP or File Manager, rename the likely plugin folder under wp-content/plugins. WordPress will deactivate it because it cannot find the folder. If the active theme caused the issue, rename that theme folder under wp-content/themes and make sure a default theme is available.

Tip: Do not break a live site on purpose to test Recovery Mode. Test recovery drills on staging, which is a copy of the site used for safe testing.

WordPress plugins screen used to inspect or disable a faulty component

Restore from backup when rollback is safe

A backup restore works best when the failure is ordinary breakage: a failed update, bad theme edit, migration mistake, deleted file, or change you can place in time.

Before you restore, check three things:

  • Confirm the backup is complete: A WordPress restore usually needs the database and the files. The database stores posts, users, orders, settings, and plugin data. Files store WordPress core, themes, plugins, uploads, and configuration.
  • Confirm the backup is clean: For a hack, the first visible symptom may appear days after the attacker got in. Scan or inspect the backup before trusting it.
  • Confirm what data is newer than the backup: Export orders, leads, bookings, users, comments, memberships, and new posts created after the restore point.

Use staging when you can. Restore there first, check the site, then move carefully to production. If one plugin update broke checkout, a selective rollback is usually safer than replacing the whole database.

For WooCommerce, booking, membership, and lead-heavy sites, daily backups may still be too old. A store can lose paid orders in a few hours. Real-time backups matter because they reduce the gap between the last safe restore point and the moment the site failed.

Warning: Do not restore a hacked site from an old backup unless you can verify the backup is clean. Otherwise you may put the same backdoor back online.

Recover when wp-admin is unavailable

Losing wp-admin feels like losing the site. Usually, you lost one entrance, not every entrance.

Use tools outside WordPress:

  • Check the host panel first: Look for backups, snapshots, File Manager, database tools, logs, and PHP settings.
  • Use your backup service dashboard: Some backup tools can restore without wp-admin.
  • Disable the likely broken plugin or theme: Use SFTP or File Manager to rename its folder.
  • Read the error logs: Logs can point to a plugin, theme, memory limit, PHP version, or missing file. PHP error monitoring makes those failures easier to catch before access is gone.
  • Use phpMyAdmin only for targeted fixes: phpMyAdmin is a database tool from many hosts. Use it for narrow fixes, such as wrong site URLs, not broad guessing.
  • Use SSH or WP-CLI only if you know them: SSH is command-line server access. WP-CLI is command-line WordPress control. They are powerful, but mistakes are faster too.

This is where outside-admin recovery matters. WPRemote Emergency Connector is useful when wp-admin is unreachable but you still need a way to connect, inspect, and recover the site. If every recovery path depends on wp-admin, the first serious crash can remove your main tool.

When a theme is part of the failure, the recovery goal is to make sure WordPress has a working default theme to fall back to.

WordPress themes screen showing a default theme available for fallback

Manually restore files and database

Manual restore is the hands-on route. Use it when dashboards are unavailable or when you need tight control over what gets replaced. You need both parts:

  • A file backup: WordPress core, themes, plugins, uploads, and configuration.
  • A database backup: an SQL file, which is a database export containing posts, settings, users, plugin tables, orders, and other stored data.

Use this order:

  • Export the current database first: Keep a copy before replacing anything.
  • Confirm database details: Open wp-config.php and check the database name, user, password, host, and table prefix. The table prefix is the small label WordPress expects at the start of its database table names.
  • Import the SQL backup: Use phpMyAdmin or your host database tool.
  • Restore the files: Upload or extract the file backup through SFTP or File Manager. Keep the folder structure intact.
  • Handle wp-config.php carefully: On the same host, the current file may have the right database details. On a new host, it may need changes.

If WordPress shows the installation screen after a restore, it usually cannot see the expected database tables. Check the database name, import result, table prefix, and whether the backup included the full database. Manual restore can save a site. It can also break one quickly. If the site handles payments, personal data, subscriptions, or client business, restore on staging or get help before guessing in production.

Treat hacked-site recovery as a security incident

A hacked site is not just a broken site with worse symptoms. The job is to remove the infection, close the entry point, and prove the attacker cannot walk back in. Common signs include redirects, browser warnings, Google warnings, host suspension, unknown admin users, spam pages in search results, strange files in uploads, or emails sent from your server.

  • Contain the risk first: Put the site in maintenance mode or ask the host for a 503 if visitors may see unsafe pages.
  • Back up the infected state: You may need evidence, logs, recent orders, or clean content later.
  • Check nearby sites: If several sites share the same hosting account, one infection can point to a wider problem.
  • Rotate important passwords: Change WordPress admin, hosting, SFTP or FTP, database, and API passwords.
  • Remove unknown admins: Do not leave any account you cannot explain.
  • Replace clean software from trusted sources: Replace WordPress core, and reinstall plugins and themes where possible.
  • Scan files and database content: Check uploads, active themes, plugin files, .htaccess, options, posts, and users.
  • Patch or remove the entry point: Update the vulnerable plugin, remove abandoned code, fix weak passwords, or close unsafe access.
  • Request review after cleanup: If Google, browsers, or your host showed warnings, request review only after the cleanup is complete.

The tricky part is timing. The redirect may appear today even if the weak password, vulnerable plugin, hidden admin user, or backdoor has been there for weeks.

That is why a backup is not automatically a cure. Use an old backup only if you can verify it is clean and old enough to predate the compromise. If the incident involved automated login attempts or spam injections, tighten WordPress bot protection before reopening the site.

Get professional help if customer data, payment data, repeated infection, multiple infected sites, host suspension, or legal reporting duties may be involved.

Recover without a backup

No-backup recovery is salvage, not a true restore. Some data may be gone. Start with sources that may still hold a copy:

  • Ask the host for hidden snapshots: Hosts sometimes keep internal backups that do not appear in WordPress.
  • Check old tools and accounts: Look at old backup plugins, remote storage, agency accounts, developer handoffs, and staging sites.
  • Search the server for leftovers: Remaining files or database tables may still exist.
  • Check developer machines or repositories: Custom theme files may live outside the server.
  • Rebuild public pages from public sources: Use public archives, search snippets, RSS feeds, PDFs, and email campaigns.

Public archives can help rebuild what visitors saw. They cannot recover private orders, form entries, users, plugin settings, checkout data, or media that was never archived. After salvage, set up offsite backups before relaunch. A rebuilt site without a tested backup is still fragile.

Check the site before you call it recovered

The homepage loading once is a good sign. It is not the finish line.

WordPress Site Health status panel for post-recovery checks

Test the workflows that matter:

  • Open the main public pages: Check homepage, key pages, posts, archives, and media.
  • Log in as an administrator: Confirm wp-admin works for real admin accounts.
  • Submit the important forms: Test contact forms, quote forms, newsletter forms, login, registration, password reset, and email delivery.
  • Run the money path: For stores, test checkout, taxes, shipping, coupons, payment, order emails, and refunds.
  • Check member or booking flows: Test downloads, courses, subscriptions, appointments, and paid access if relevant.
  • Clear and review caches: Check plugin cache, host cache, CDN cache, and browser cache.
  • Refresh permalinks: Save permalink settings if URLs return 404 errors.
  • Run a security scan: A clean homepage is not the same as a clean site.
  • Review external warnings: Check Google Search Console, host notices, and browser warnings.
  • Confirm backups now work: Check schedule, offsite storage, and restore access.
  • Watch the site for 24 to 48 hours: Monitor uptime, errors, redirects, forms, and orders.

For a store, follow the money. For a lead site, follow the form. For a membership site, log in as a normal user. If the business flow fails, the site is not recovered.

WPRemote’s WordPress backups, monitoring, and emergency access are useful after this point because they turn recovery into a prepared workflow. They do not replace triage, but they make the next outage less dependent on memory and luck. A recovered site should be checked from the public side too, using real pages visitors rely on.

Recovered WordPress frontend page used for verification

If restored URLs return 404s, the permalink settings screen is the common first repair checkpoint.

WordPress permalink settings used after a restore

Prevent the next recovery crisis

Recovery is easier when the plan exists before the failure.

  • Keep offsite backups: Do not rely only on backups stored on the same server.
  • Create restore points before risky changes: Do this before plugin, theme, WordPress core, PHP, and server updates.
  • Use real-time backups for busy sites: Stores, booking sites, membership sites, and active lead sites change too often for daily backups alone.
  • Test risky updates on staging: Do not test a business-critical update on production before a campaign or sale.
  • Turn on monitoring: Use uptime and security monitoring so problems surface early.
  • Use separate admin accounts: Shared logins make it harder to know what changed.
  • Add two-factor authentication: Two-factor authentication means logging in with a password plus a second check, such as an app code.
  • Test one restore before you need it: A backup you have never restored is still an assumption.

For a small brochure site, daily offsite backups and a careful update routine may be enough. For a revenue-generating site, recovery needs to be part of normal site operations.

Know when to get help

Some recovery work is reasonable for a careful site owner. Some is not worth learning during an outage. Get help when:

  • customer, payment, or personal data may be exposed
  • more than one site on the same server is infected
  • the site keeps getting reinfected
  • there is no clean backup and downtime is business-critical
  • the database is corrupted or only partly restored
  • WooCommerce, bookings, memberships, or subscriptions could lose data
  • legal, compliance, or client reporting duties may apply
  • you are not sure whether a backup is clean

The practical test is simple: if the cost of guessing is higher than the cost of expertise, escalate.

FAQs

What should I do first when my WordPress site breaks?

Stop making changes and back up the broken site if you can. Then identify whether the problem is a fatal error, hack, failed update, missing file or database, or access problem.

How do I recover WordPress if I cannot access wp-admin?

Use tools outside WordPress, such as your host panel, backup dashboard, File Manager, SFTP, phpMyAdmin, server logs, SSH, WP-CLI, or an outside-admin recovery tool such as WPRemote Emergency Connector.

Should I restore a hacked WordPress site from backup?

Not as the first fix. The backup may already include malware, a backdoor, an unknown admin user, or infected database content. Clean the site, rotate passwords, patch the entry point, and restore only from a backup you can verify as clean.

When should I use WordPress Recovery Mode?

Use Recovery Mode for fatal errors caused by a plugin, theme, code snippet, or PHP conflict. It helps you enter wp-admin and disable the faulty part. It does not clean malware or restore deleted content.

Can I recover a WordPress site without a backup?

Sometimes, but usually only partly. Ask the host for snapshots, check old backup tools and staging copies, salvage remaining files or database tables, and use public archives to rebuild visible content.

Conclusion

WordPress site recovery starts with a calm first move: preserve what still exists before you replace anything. Once you know whether the issue is a fatal error, failed update, hacked site, missing database, or no-backup loss, the safer route becomes much clearer.

Do the smallest clean fix that solves the real problem, then verify the workflows that matter. A recovered site should load, take orders or leads, send emails, pass security checks, and have a tested backup path for the next emergency.

Tags:

You may also like


How do you manage your websites?

Managing multiple WordPress websites can be time consuming and error-prone. WP Remote will save you hours every day while providing you complete peace of mind.

Managing everything yourself

But it’s too time-consuming, complicated and stops you from achieving your full potential. You don’t want to put your clients’ sites at risk with inefficient management.

Putting together multiple tools

But these tools don’t work together seamlessly and end up costing you a lot more time and money.