SwitchFromWP

How to Back Up a WordPress Site Before Migrating: Database, Files and Everything Else

What a complete WordPress backup includes, three ways to make one, how to prove it works with a test restore, where to keep it, and the separate exports a backup will not give you in a usable form.

Written by a Certified Lovable ExpertFacts checked 25 November 20264 min read

This page recommends Lovable and contains partner links. If you sign up through one I may earn a commission, at no extra cost to you. Disclosure.

The short answer

A complete backup is two things: a copy of the database (posts, pages, settings, users, form entries stored in WordPress) and a copy of the files (wp-content with uploads, themes and plugins, plus wp-config.php). Make it with your host's backup tool, a backup plugin or manually through the control panel, download it to storage you control, and open it to check it is complete. Also save the records a backup will not hand you in a usable form: DNS records, form entries held by third-party services, SEO settings and redirects. Keep it until long after you have switched to Lovable and cancelled the old hosting.

5 sections

On this page
  1. 1. What a full backup includes
  2. 2. Three ways to make the backup
  3. 3. Prove the backup works
  4. 4. Where to keep it and for how long
  5. 5. Exports a backup will not give you in a usable form
01

What a full backup includes

  • Database

    Where it livesMySQL or MariaDB, usually exported as a .sql file

    Why you need itPosts, pages, comments, users, settings, menus, custom fields and plugin data

  • Uploads

    Where it liveswp-content/uploads

    Why you need itImages, PDFs and every file you have uploaded

  • Themes and plugins

    Where it liveswp-content/themes, wp-content/plugins

    Why you need itTemplates and custom code you may need to refer to while rebuilding

  • Configuration

    Where it liveswp-config.php, .htaccess

    Why you need itDatabase settings, and any redirects or rules set at server level

  • DNS records

    Where it livesYour DNS provider, not your host's backup

    Why you need itWebsite and email records you need if anything goes wrong at cutover

The WordPress Tools > Export file is not a backup. It holds posts, pages, comments, custom fields, categories and tags, but not your settings, plugin data, theme or the media files themselves. Make a full backup as well as the export.

02

Three ways to make the backup

  1. 01

    Your host's backup tool

    Many hosts offer a one-click backup or downloadable snapshot in the control panel. Check whether it includes both files and database, and download a copy rather than leaving it only on the host.

  2. 02

    A backup plugin

    A reputable backup plugin can create a database and files archive and send it to your own cloud storage. Check the archive includes uploads and the database, not just one of them.

  3. 03

    Manually

    Export the database from phpMyAdmin (or your host's database tool) as SQL, and download wp-content and wp-config.php over SFTP or the host's file manager.

Large sites

Large sites can make a backup plugin time out or produce a partial archive. If the uploads folder is several gigabytes, use the host's tool or download the files over SFTP.

03

Prove the backup works

  • Open the archive and check wp-content/uploads contains your media for every year you have published.
  • Open the .sql file in a text editor and search for a recent post title to confirm the database is current.
  • Check the file sizes are plausible: a database of a few kilobytes for an established site usually means something is missing.
  • Ideally, restore it to a temporary or local WordPress install and confirm the site loads with its content.
  • Write down the date of the backup and what it includes.
04

Where to keep it and for how long

  • Keep at least two copies in places you control, for example your own cloud storage and an offline drive. Do not rely only on the old host: their copy disappears when you cancel.
  • Treat the backup as sensitive. It contains user accounts, email addresses and any personal data your forms stored.
  • Keep it well beyond launch. Old content, a forgotten page or a form entry may be needed months later.
05

Exports a backup will not give you in a usable form

  • Form entries

    What to saveExport entries from your form plugin, or from the third-party service that stores them, as CSV

  • SEO settings

    What to saveTitles, meta descriptions and redirects from your SEO or redirect plugin

  • Shop data

    What to saveCustomers, orders and subscriptions exported from WooCommerce or your payment provider

  • Email list

    What to saveSubscribers from your newsletter tool, if WordPress held them

  • Analytics

    What to saveNote your tracking IDs and export any reports you want to keep

  • DNS

    What to saveA screenshot or export of every record at your DNS provider

See exporting WordPress content for getting content into a form you can rebuild from.

Migration support

Want a hand with this part?

Not sure your backup is complete, or how to get one from your host? Get help before you change anything. Tell me about your site and I will reply personally. Every move is quoted on what your site needs, and enquiring does not commit you to anything.

Ready to build the new site?

Start a Lovable project and rebuild privately before you touch your live domain.

Start on Lovable
Certified Lovable Expert
QR code linking to Lovable with the partner linkScan to try LovableOr tap the code on mobile

Sources and further reading

This guide was reviewed against official documentation on 25 November 2026. Recommendations are not guarantees; follow the live sources for current product details.

Read next