Restore the backup file on the new host, verify files, database, and site URLs in a temporary preview, then switch DNS only after the site loads correctly. If you reverse that order, logins can fail, files can go missing, or visitors can land on a half-restored site. This guide covers preparing the backup, restoring each part, checking the site, and making the DNS cutover safely.

This guide is part of our Website backups: Complete guide to backup and restore series.

Backup file package

A website backup file can be a zip or tar.gz archive that holds site files, and sometimes a database export too. Treat it as a migration package, then check whether the archive is files-only or includes the database and configuration pieces needed for a full restore. A complete package should also preserve dotfiles such as .htaccess when the site depends on them.

Files-only backups

Files-only backups fit static sites, brochure sites, and any build where content lives in files rather than a database. They usually include themes, uploads, scripts, and dotfiles, but they do not move content stored in a database. If the site uses forms, accounts, or CMS content, files alone are usually not enough.

Files plus database backups

Many CMS installs need both site files and, in many cases, a separate database export. Stablepoint says a complete backup should include files, databases, and configurations, which is the safer baseline for a host move. For WordPress and many other CMSs, the database often contains posts, pages, settings, and login data.

WordPress migration packages

WordPress migration plugins can bundle the site into one package that carries files and database together. Liquid Web names Duplicator, All-in-One WP Migration, and Migrate Guru as migration plugins, and it also notes that WordPress migration includes database, theme files, plugins, media, and settings. That makes plugin packages useful when the site is WordPress and the goal is a controlled restore on the new host.

Prepare the new host before you restore

Set up the destination before any upload begins. Confirm the document root, create or map the database if the site needs one, and make sure the control panel gives you file manager and database access. A correct destination shortens rollback time if the first restore fails.

Choose the document root

In the hosting control panel, confirm which folder actually serves the domain. Many hosts let you pick or map the document root during site setup, and restoring into the wrong folder is a common reason a site appears blank after upload. If the panel lists multiple paths, note the one tied to the domain before transferring anything.

Create or map the database

If the backup includes a database, create an empty database and user before importing. Record the database name, username, password, and host value exactly as the control panel shows them. The application config has to point at that new database, or the site may load the files while still showing old content or database errors.

Confirm file manager and FTP/SFTP access

Check that the host provides file manager access and that your FTP/SFTP client can reach the account. File manager lets you unpack archives on the server, while FTP/SFTP handles uploads, downloads, and folder comparisons. If the archive is large, confirm that the host does not impose a small upload limit that would truncate the restore.

How do you restore the site files?

Restore the file archive into the correct document root, then verify that the directory structure matches the original site. Use file manager for direct unpacking when the host allows it, or use FTP/SFTP when you need to transfer many files or compare folders before the cutover. Keep dotfiles and hidden config files in the restore.

Restore with file manager

  1. Upload the archive. Place the zip or tar.gz file in the target document root or in a temporary folder the host can read. Then extract it there, because unpacking in the wrong folder can leave the public web root empty.
  2. Verify the extracted folders. Confirm that the visible tree matches the original site layout, including assets, themes, uploads, and any hidden dotfiles. If the host extraction tool skips hidden files, upload them separately.

Restore with FTP/SFTP

  1. Transfer the files. Use your FTP/SFTP client to upload the archive contents into the correct web root. Directory comparison helps catch missing folders before DNS changes, which matters when the backup is partial or split across multiple directories.
  2. Check permissions and paths. Make sure the application can read its config, image folders, and cache directories. A correct path with wrong permissions can still produce broken pages or missing media.

Check dotfiles and folder structure

Dotfiles matter more than many guides admit. FileZilla Pro says full downloads should include dotfiles like .htaccess, and many sites need that file for redirects, rewrites, or clean URLs. If the restored site loads but URLs break, the first place to check is the hidden files and the root folder placement.

For example, if an archive is about 2.4 GB and the host’s file manager times out during extraction, use a different extraction method. Upload the archive by FTP/SFTP, extract it in the target directory, then compare the resulting folder list against the source before touching DNS.

Do you need to import the database separately?

Yes, whenever the backup file does not already include a usable database import. File archives move the code and media, but content management systems often keep posts, settings, users, and form entries in a separate database. If the backup includes an sql.gz export, import that file after the site files are in place.

Import from phpMyAdmin or host tools

  1. Open the database tool. Use phpMyAdmin or the host’s import utility to select the empty database you created earlier. The import step belongs after the files are restored, because the application config needs a target database to connect to.
  2. Load the export file. Import the sql or sql.gz file and wait for completion before opening the site. Liquid Web notes that cPanel backup workflows can produce a sql.gz database file, which is common enough to plan for in host migrations.

Match database name, user, and charset

The database may import cleanly and still fail at runtime if the config file points at the wrong database name or user. Check the character set too, especially if the old site stored accented characters or non-Latin text. Charset mismatches can show up as broken text, failed logins, or garbled titles.

Confirm the app config points to the new database

Update the site’s connection file so it points to the new host’s database name, user, password, and server value. For WordPress, that means the database values in wp-config.php must match the new account. For other CMSs, the same idea applies: files can be perfect, but the site still fails if the config points elsewhere.

Backup type Restore step Verification test Common failure sign Rollback action
Files-only Upload the archive into the new document root and extract it Open the temporary URL and confirm the homepage, images, and CSS load Blank page, missing images, or 404s for CSS and scripts Restore the original file tree from the old host and recheck the target path
Files-plus-database Restore files first, then import the sql.gz export into the new database Sign in, open a content page, and submit a form Login failure, old content missing, or database connection errors Re-import the database, confirm credentials, and switch back to the old host if needed
WordPress backup package Use the package installer or plugin restore path, then update site URLs if required Check the admin dashboard, a media page, and a permalinked post Broken permalinks, mixed content, or the installer cannot find wp-content Rebuild the package, verify wp-content and wp-config.php, or fall back to a manual restore

How do you test the site before DNS cutover?

A person carries files between two computer screens
Check key pages, forms, and logins on the preview while the old host stays live.

Test the site on a temporary URL or staging preview before you change DNS. The same source says DNS should be changed only after testing the new copy, and that order prevents visitors from reaching a half-restored site. Check pages, images, forms, logins, and redirects while the old host is still live.

Use a temporary URL or staging preview

  1. Open the preview address. Use the host’s temporary URL, staging subdomain, or preview tool to load the restored site without moving the live domain. This lets you validate the new host while the old host still answers public traffic.
  2. Confirm site URLs. Make sure the preview shows the new host path and not the old domain embedded in assets or links. If the site was cloned, old URLs in the database may need a search and replace before the cutover.

Check pages, images, forms, and logins

  1. Load key pages. Open the homepage, one product or article page, and one deep link that uses a permalink. Broken routes here often point to rewrite rules, wrong document roots, or missing database rows.
  2. Test interactive features. Submit a form, log in, and open at least one page with media and one page that redirects. These checks catch missing database tables, broken sessions, and content that only fails after login.

Watch for mixed content, missing media, and redirect loops

A common first-timer mistake is to restore the backup but forget to check that the contact form and database-driven pages load correctly on the new host. A site can load that page while images 404, logins fail, or old HTTP links trigger mixed content warnings after an HTTP to HTTPS move. Check redirects carefully, because one bad rule in .htaccess can turn the preview into a loop.

Suppose the site opens at the preview URL but every image returns 404. That usually means the files were restored into the wrong folder or the uploads directory is missing, while the database itself may still be intact. Fix the file path before DNS, because changing the domain first only makes the fault harder to isolate.

When should you use a migration plugin instead?

Use a migration plugin when the site is WordPress and you want one package that contains both files and database. It is a better fit when the restore needs to be repeatable, the site has many plugins, or the host’s manual import tools are limited. For a files-only site, a plugin is unnecessary overhead.

WordPress backup packages

A plugin package can reduce the number of moving parts, but it still needs the same checks: files, database, and URLs have to line up on the new host. If the package is incomplete or the installer cannot write to the target directory, fall back to a manual restore with the backup file and database export.

When a file restore is safer than manual copy

Manual file copy is safer when the archive is already complete and the site has no complex database dependency, or when you need to inspect hidden files before they go live. If the backup is partial, missing dotfiles, or split across several exports, treat it as a recovery task rather than a simple copy.

When the host-managed migration is the better choice

Choose host-managed migration when the old site is large, the database is sensitive, or the destination host provides a migration tool that can move files and database together with less manual input. That choice is also sensible when DNS timing matters and you want the provider to stage the transfer before the domain switches.

Keep reading

Frequently asked questions

How do I migrate a website to a new host using a backup file?

Restore the backup on the new host, then verify files, database, and URLs in a preview environment before changing DNS. That sequence reduces the chance of broken logins, missing media, or partial content going live. Keep the old host active until the new copy passes those checks.

What files do I need to move when I restore a site on a new host?

Move the full web root, not just visible pages. For WordPress, that means wp-content, wp-config.php, themes, plugins, uploads, and dotfiles like .htaccess, plus any custom folders the site uses. If the site is not WordPress, include the application files and any hidden config files the app requires.

Do I need to transfer the database separately from the backup file?

Yes, if the backup file contains only site files or if the CMS stores content in a separate database. Import the database export through phpMyAdmin or the host’s database tool, then update the application config so it points to the new database name, user, and password.

How do I test the site before changing DNS to the new host?

Use the host’s temporary URL or staging preview and check the homepage, a deep page, images, forms, and logins. Also watch for mixed content, broken redirects, and missing media. Do not change DNS until the preview behaves like the live site.

What should I do if some files are missing after migration?

Compare the new host’s folder tree against the backup contents, then re-upload the missing directories or dotfiles. If the archive was partial, rebuild it from the source host before another attempt. Missing .htaccess, uploads, or plugin folders usually explain the failure faster than the database does.

Should I keep the old host active during the migration?

Yes. Keep the old host active until the new site passes preview checks and DNS propagation has had time to settle. That gives you a rollback path if files, database import, or URLs fail after the switch. If anything breaks, you can point traffic back while fixing the new copy.