How to Back Up Your Website Before Moving Hosts
A migration without a backup is a gamble. The backup is your rewind button — if anything breaks mid-move, you restore and nobody ever knows. Here’s how to do it properly.
What “full backup” actually means
A real backup has four parts. Most people grab one or two and call it done.
- Website files — everything in
public_html: code, themes, plugins, uploads, media. - Database — posts, pages, users, settings, orders. For WordPress, this is the MySQL database.
- DNS records — a screenshot or export of your DNS zone. If you fat-finger a record during the move, this is how you put it back.
- Email — mailboxes and forwarders, if email is hosted with your web host.
Step 1: Back up the files
cPanel: File Manager → compress public_html to a zip, then download it. Or use FTP (FileZilla) to download everything — slower but you see exactly what you got.
WordPress plugin route: UpdraftPlus or All-in-One WP Migration can package files + database into one downloadable archive. UpdraftPlus can also push the backup straight to Google Drive or Dropbox.
Manual: FTP download of the entire document root. Tedious for large media libraries, but foolproof.
Check the size when it finishes. If your site is 2GB and the backup is 40MB, something didn’t get captured.
Step 2: Back up the database
phpMyAdmin: select the database → Export → Quick → Go. Download the .sql file. For large databases, use the Custom export with compression enabled.
Plugin route: covered automatically by UpdraftPlus / All-in-One WP Migration.
Command line (if you have SSH): mysqldump -u username -p database_name > backup.sql — fastest for big databases.
One database per site. If you run multiple sites, export each one separately and label the files clearly.
Step 3: Save your DNS records
Screenshot your DNS zone editor, or export the zone file if your provider allows it. You need: A records, CNAMEs, MX records, TXT records (SPF, DKIM, DMARC), and any SRV records. DNS mistakes are the most common migration breakage, and a record of the working configuration turns a crisis into a five-minute fix.
Step 4: Don’t forget email
If your host handles email: note every mailbox, forwarder, and autoresponder. Copy important mail via IMAP to a local client (Thunderbird) or to the new host later. At minimum, export anything you couldn’t afford to lose — invoices, contracts, client correspondence.
Step 5: Store it somewhere safe
The backup must live outside both hosting accounts. Your laptop, an external drive, Google Drive, Dropbox — anywhere that’s not the server you’re leaving or the one you’re moving to. A backup stored on the server it backs up isn’t a backup, it’s a copy.
Keep at least two copies in two places for anything business-critical.
What can go wrong with backups (and how to prevent it)
Backups fail in predictable ways. Knowing them in advance is the difference between a safety net and a false sense of security:
- Incomplete backups: the process timed out halfway through and nobody noticed. Prevention: check file sizes and counts against the live site every time.
- Backups stored on the same server: the server dies, the backup dies with it. Prevention: always copy off-server immediately.
- Corrupt archives: zip files that won’t open, SQL dumps that are actually HTML error pages. Prevention: the spot-check routine in Step 6.
- Stale backups: the “backup” is from six months ago because automation broke silently. Prevention: check backup dates monthly; set up failure notifications.
- Backing up the wrong database: sites with similar database names (site_prod vs site_staging) get mixed up. Prevention: label everything, verify the database name in the control panel before exporting.
Every one of these has bitten someone during a migration. The pattern is always the same: the backup existed, but nobody verified it.
Migration-day backup checklist
Run this the morning of the move:
- Full file backup downloaded and stored off-server
- Database exported (one file per site, clearly labeled)
- DNS records screenshotted or exported
- Email accounts inventoried, important mail copied
- Backup sizes sanity-checked against the live site
- SQL files opened and confirmed to be actual SQL
- Second copy in a different location (cloud storage, external drive)
Thirty minutes of verification buys total confidence for the rest of the migration.
After the migration succeeds: don’t delete the pre-migration backup immediately. Keep it for at least 30 days as your rollback point — if a subtle problem surfaces in week three (a missing redirect, a broken integration), the original backup is the fastest way to compare and recover. After a month of clean operation, fold it into your normal backup rotation and let retention policies handle it.
Step 6: Test the restore
An untested backup is a hope, not a backup. You don’t need to do a full restore drill, but at minimum:
- Open the SQL file in a text editor — confirm it’s actual SQL, not an error page saved as
.sql(happens more than you’d think with phpMyAdmin timeouts). - Unzip the file archive and spot-check that key files are present (
wp-config.php, theme folder, uploads). - For WordPress plugin backups, verify the archive isn’t corrupt by checking its size against your site’s known size.
If you have a staging environment or local server, doing one full test restore before migration day is the gold standard. It also rehearses the migration itself.
Quick restore-test for WordPress: spin up a free local WordPress with LocalWP or a cheap staging subdomain on the new host, import your backup there, and click around. If the backup restores cleanly into a fresh environment, it’ll restore anywhere.
How often to back up (beyond migration day)
Migration backups are one-offs, but they should plug into a routine:
- Active sites (daily changes): daily automated backups, kept for 30 days
- Brochure sites (rarely change): weekly backups are plenty
- Stores: daily at minimum — every order since the last backup is data you’d reconstruct by hand
- Before any big change: plugin updates, theme switches, redesigns — take a manual backup first, always
Most decent hosts include automated backups. The question to ask isn’t “do you back up?” but “how often, how long do you keep them, and can I restore with one click?” If the answer to the last one is no, run your own with UpdraftPlus on a schedule.
Automating it
Don’t rely on remembering. Set it once:
- UpdraftPlus: set a schedule (daily/weekly), choose remote storage (Google Drive, Dropbox, S3), set retention. It emails you if a backup fails.
- cPanel: the built-in Backup section can schedule full backups, though retention management is manual.
- Host-level: enable whatever automated backups your host offers in addition to your own — two independent backup systems means one can fail without disaster.
When to delete the backup
Don’t. Keep the pre-migration backup for at least 30 days after the new site is verified working. Storage is cheap; the one time you’ll need it is the time you deleted it. After a month of smooth operation on the new host, rotate it into your normal backup retention.
Backups are boring right up until they’re the only thing standing between you and rebuilding a site from memory. Take the hour. Future you says thanks.