Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A database backup can restore your WordPress content and settings, but it cannot recreate the files that run and display the site. To recover successfully, rebuild or obtain a compatible WordPress file set, import the SQL dump into a new MySQL or MariaDB database, connect it with wp-config.php, correct URLs only if the address changed, and test the rebuilt site before replacing production.

What a database-only backup restores

A SQL dump contains database-resident information such as posts, pages, comments, users, menus, widgets, and WordPress settings. It does not contain the executable and media files required by the web server.

Available in the database dump Must come from files or the server
Posts, pages, comments, users, and other stored content WordPress core PHP files
Site options, menus, widgets, and plugin settings stored in tables Active and inactive themes and plugins
Many configuration values saved by WordPress wp-content/uploads media files
Custom post types and metadata recorded by installed code wp-config.php, .htaccess, and web-server rewrite configuration

This distinction explains why an imported database can show familiar titles while producing missing images, a broken design, or a fatal error. WordPress.org states in its Advanced Administration Handbook: “You need both to be able to fully restore a typical WordPress site.”

Preserve the dump and record what is known

Make a working copy

Copy the original .sql, .sql.gz, or similar export to separate storage and perform experiments on the copy. Keep the original untouched until the rebuilt site has passed testing. A failed import or search-and-replace operation should never destroy your only recovery artifact.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Record identifying details

  • Export date and the database filename.
  • Database name and table prefix, if they are known.
  • The former site URL, including whether it used HTTP or HTTPS.
  • The WordPress and PHP versions, if an old hosting account, deployment record, or file archive identifies them.
  • Whether the dump is plain SQL or compressed.

These details help you select compatible files and distinguish a genuine application error from a connection or URL mismatch.

Choose a controlled recovery environment

Use a temporary staging host, local server, or separate hosting account whenever possible. Importing into a new database prevents an incomplete recovery from overwriting a live site. Move to production only after the rebuilt copy works.

Environment Best use Main trade-off
Staging site or temporary host Safely checking files, URLs, plugins, media, and redirects Requires an additional host or setup step
Existing empty production database Recovery when no staging environment is available Errors are immediately visible to visitors and harder to undo
Live database containing other data Only when a careful, verified replacement is unavoidable Highest risk; an import can overwrite unrelated tables

The destination needs a functioning web server, PHP, and MySQL or MariaDB. Match the recovered WordPress, theme, and plugin versions as closely as the available evidence allows; code that is too old or too new for the PHP version can fail even when the SQL import succeeds.

Obtain the WordPress files the database cannot supply

WordPress core

Place a clean WordPress core matching the recovered installation as closely as possible in the document root. If the original version is unknown, use a currently supported release only after confirming that the recovered themes and plugins can run on it; otherwise, reproduce the older compatible environment first and plan an upgrade after recovery.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Themes and plugins

Recover the original wp-content/themes and wp-content/plugins directories from a file backup, version control, the original hosting account, or trusted vendor downloads. The database may remember which extensions were active, but it cannot recreate their PHP, JavaScript, CSS, or image files. If custom code is unavailable, clean compatible replacements may restore basic operation but can change the design or functionality.

Uploads and server rules

Restore wp-content/uploads separately. Image references in posts are database values; the image files themselves are not. Also recreate any required .htaccess rules, Nginx configuration, SSL setup, cron jobs, and other server-level settings from the hosting environment.

Create the destination database and import the dump

Prepare an empty database

Create a MySQL or MariaDB database and a user with permission to create and modify tables. Note the database name, username, password, host, and the table prefix used by the dump. Do not assume the prefix is wp_; inspect the imported table names or the old configuration.

Import with phpMyAdmin

  1. Sign in to phpMyAdmin on the destination server.
  2. Select the empty destination database in the left sidebar.
  3. Open Import, choose the SQL or compressed SQL file, and start the import.
  4. Wait for the completion message and confirm that the expected tables appear, including the options table with its actual prefix.

Large dumps may exceed hosting upload or execution limits. In that case, use the host’s documented command-line method or ask the host to import the file rather than splitting it with an unreliable text editor.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Import from a shell

Where the MySQL client is available, a typical plain-SQL import is:

mysql -u DB_USER -p DB_NAME < backup.sql

Enter the password when prompted. Replace the database and user names with the destination values, and use the appropriate host option if the database server is not local. For a compressed export, decompress it safely or use the host’s supported streaming command.

Connect WordPress to the imported tables

Edit the recovered or newly created wp-config.php in the document root. The database constants and table prefix must describe the destination, not the old hosting account:

define( 'DB_NAME', 'destination_database' );
define( 'DB_USER', 'destination_user' );
define( 'DB_PASSWORD', 'destination_password' );
define( 'DB_HOST', 'database_host' );
$table_prefix = 'actual_prefix_';

Keep the existing authentication keys and other site-specific settings when they are known and trusted. Ensure the web server can read the file while protecting it from public download. If the prefix in wp-config.php does not match the imported table names, WordPress behaves as though it has no installation and may display the setup screen.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Repair the site address only when it changed

When the domain and scheme are unchanged

Leave the stored URLs alone. Unnecessary replacement can damage serialized settings and create new redirect problems.

When the domain, path, or HTTP/HTTPS scheme changed

In the options table, locate the rows named siteurl and home using the dump’s actual table prefix, then set them to the new canonical address. Check for a path component as well as the domain; https://example.com/blog is not interchangeable with https://example.com.

Those two rows are only the first step. Post content, widget settings, and plugin options can contain the old address. Use a serialization-aware migration tool for a full replacement. For example, WP-CLI’s search-replace operation can update serialized values when run against the intended database:

wp search-replace 'https://old.example' 'https://new.example' --all-tables-with-prefix

Review the command’s scope and take a fresh database copy before running it. A naïve SQL text replacement can leave serialized string lengths incorrect, producing a corrupted layout or unreadable settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Regenerate and test the rebuilt site

  1. Open the front page and sign in to /wp-admin.
  2. Open several posts and pages representing different templates, including one with images, galleries, embeds, or custom fields.
  3. Check that the recovered theme loads its styles and that every required plugin is present and compatible.
  4. Test media URLs, image thumbnails, downloads, forms, comments, menus, widgets, search, and user logins.
  5. Verify the canonical domain, HTTPS certificate, redirects, cookies, and mixed-content warnings.
  6. Open Settings > Permalinks and click Save Changes once if imported pages return 404 errors; this regenerates WordPress rewrite rules.
  7. Review PHP, web-server, and database logs for fatal errors, missing extensions, permission failures, and scheduled-task failures.
  8. Only after these checks pass, make a fresh backup of the rebuilt site and plan the production cutover.

Diagnose common recovery failures

The WordPress installation screen appears

Check that DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST point to the destination, that the import actually completed, and that $table_prefix matches the imported tables. An empty or differently prefixed database produces the same symptom.

A white screen or fatal error appears

Look in the PHP log for the missing or incompatible theme, plugin, PHP extension, or version. Temporarily disable the offending extension by renaming its directory, then install a compatible release before re-enabling it. Do not delete the database rows that record its settings until the files are recovered.

Images and downloads are broken

Restore the uploads directory and confirm that its path and file permissions match the web server. Database rows can preserve attachment references without preserving the underlying files.

The site redirects to the wrong domain or loops

Check siteurl, home, hard-coded URLs in configuration or extensions, HTTPS enforcement, reverse-proxy settings, and any old server redirects. Correct the canonical address before running a serialization-safe replacement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Pages return 404 after import

Save the permalink settings, then verify that Apache rewrite rules or the equivalent Nginx configuration are enabled. A database import does not recreate web-server rewrite rules.

The layout becomes corrupted after URL replacement

Restore the pre-replacement database copy and repeat the operation with a serialization-aware tool. Plain string substitution can invalidate the stored length of serialized values.

When the original files cannot be recovered

You can still extract the site’s database content and settings, but a faithful visual or functional restoration is not guaranteed. Install clean WordPress core, reconstruct the theme with a compatible replacement, reinstall extensions whose settings are useful, and restore whatever uploads remain. Treat this as a rebuild: preserve the imported database, document every replacement, and expect custom templates, shortcodes, integrations, and styling to require manual work.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$180.19
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$189.90

A practical recovery order

  1. Preserve the SQL dump and record its known environment.
  2. Build a staging destination with compatible PHP and MySQL or MariaDB.
  3. Obtain core, themes, plugins, uploads, configuration, and server rules.
  4. Create an empty database and import the dump.
  5. Set database credentials and the table prefix in wp-config.php.
  6. Change URLs only when the site address changed, using serialization-safe replacement for widespread changes.
  7. Regenerate permalinks, test representative site functions, inspect logs, and keep the original dump untouched until verification is complete.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.