New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

Backups

Learn how to restore WordPress from a backup.

Restoring is harder than backing up because wrong import order or URL mismatches break login and media links. Follow a sequence that puts files and database back in sync.

Time: 45-90 minutes Level: Intermediate
Neil McNaught, founder of BugShield and WordPress author
Written by
Written by
Updated
Updated

What this problem looks like

Restore order matters: files first or database first both work if you avoid using the site mid-restore. Many hosts offer one-click snapshot restore that beats manual imports when the whole server is intact.

Partial restores, such as posts only or plugins only, need matching database rows. Importing posts SQL without uploads breaks featured images.

Step 1: Full restore on the same domain

  1. Delete or rename current wp-content if it is corrupted.
  2. Upload backup wp-content via File Manager, SFTP, or FTP.
  3. Drop all tables or use a fresh database, then import the SQL file.
  4. Log into wp-admin and save Settings → Permalinks.

Step 2: Import database with phpMyAdmin or SSH

Large imports may exceed upload limits. Split the file, use the mysql command over SSH, or ask the host to import for you.

Only run the commands below if you have SSH access to the server.

bash
mysql -u DB_USER -p DB_NAME < ~/backups/mysite-2026-07-08.sql
wp db import ~/backups/mysite-2026-07-08.sql

Step 3: Restore with a backup plugin

UpdraftPlus and similar tools restore from archives inside wp-admin. Install a fresh WordPress copy if wp-admin is dead, then upload the plugin and restore components in the order the wizard suggests.

Step 4: Fix broken media and permalinks

If images 404 after restore, the uploads folder path or year/month structure is wrong. Confirm wp-content/uploads matches database attachment paths.

Resave permalinks and clear CDN cache after any restore.

Step 5: When restore fails login

Database URL options may point at the old domain. Update siteurl and home in wp_options or run wp search-replace over SSH.

If a security plugin blocks login after restore, rename wp-content/plugins to plugins.disabled via File Manager, SFTP, or FTP, then restore access and reconfigure the plugin.

When to stop DIY and hire help

A bad restore can leave mixed old and new data. BugShield restores WordPress sites from backup at a confirmed fixed price when DIY imports fail or time matters.

Questions answered

WordPress backup restore FAQs

Answers about choosing a restore point, protecting newer data, replacing files and databases, and checking the recovered site.

Can I restore only the database?

Yes for content recovery, but media must exist in uploads from the same backup period.

Why does import stop with max_allowed_packet?

MySQL packet size is too small for big dumps. Ask the host to raise the limit or import via command line over SSH.

Will restore bring back malware?

If the backup was infected, yes. Scan files before restore and patch plugins after recovery.

How long does restore take?

Small blogs finish in under an hour. Large shops with gigabyte uploads can take several hours over SFTP.

Should I back up the broken WordPress site before restoring it?

Yes. Preserve the current files and database so you can recover newer orders, users, uploads, or evidence that is not present in the older backup.

How do I choose the right WordPress restore point?

Choose the newest known-good backup from before the fault began, then confirm what content and transactions were created after that time.

Can restoring WordPress overwrite new WooCommerce orders?

Yes. A full database restore returns orders and customer records to the backup time. Protect or reconcile newer transactions before replacing the live database.

Why does a restored WordPress site redirect to the wrong domain?

The backup may contain old home and siteurl values, cached redirects, or hardcoded URLs. Correct them with a serialization-safe replacement.

Why do uploads or plugins fail after a WordPress restore?

File ownership, permissions, incomplete archives, PHP compatibility, or mismatched database and plugin versions may prevent restored files from working.

What should I test after restoring WordPress?

Test login, pages, media, forms, search, scheduled jobs, email, mobile layouts, and the complete WooCommerce order and payment journey.

Would you rather a developer fixed it?

Request a fix at a confirmed price and speak directly with the BugShield developer working on your site.

Request a Fix