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.
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
01What a full backup includes
ShowHide
Database
Where it livesMySQL or MariaDB, usually exported as a
.sqlfileWhy you need itPosts, pages, comments, users, settings, menus, custom fields and plugin data
Uploads
Where it lives
wp-content/uploadsWhy you need itImages, PDFs and every file you have uploaded
Themes and plugins
Where it lives
wp-content/themes,wp-content/pluginsWhy you need itTemplates and custom code you may need to refer to while rebuilding
Configuration
Where it lives
wp-config.php,.htaccessWhy 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
| Part | Where it lives | Why you need it |
|---|---|---|
| Database | MySQL or MariaDB, usually exported as a .sql file | Posts, pages, comments, users, settings, menus, custom fields and plugin data |
| Uploads | wp-content/uploads | Images, PDFs and every file you have uploaded |
| Themes and plugins | wp-content/themes, wp-content/plugins | Templates and custom code you may need to refer to while rebuilding |
| Configuration | wp-config.php, .htaccess | Database settings, and any redirects or rules set at server level |
| DNS records | Your DNS provider, not your host's backup | Website 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.
02Three ways to make the backup
ShowHide
- 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.
- 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.
- 03
Manually
Export the database from phpMyAdmin (or your host's database tool) as SQL, and download
wp-contentandwp-config.phpover 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.
03Prove the backup works
ShowHide
- Open the archive and check
wp-content/uploadscontains your media for every year you have published. - Open the
.sqlfile 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.
04Where to keep it and for how long
ShowHide
- 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.
05Exports a backup will not give you in a usable form
ShowHide
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
| Item | What to save |
|---|---|
| Form entries | Export entries from your form plugin, or from the third-party service that stores them, as CSV |
| SEO settings | Titles, meta descriptions and redirects from your SEO or redirect plugin |
| Shop data | Customers, orders and subscriptions exported from WooCommerce or your payment provider |
| Email list | Subscribers from your newsletter tool, if WordPress held them |
| Analytics | Note your tracking IDs and export any reports you want to keep |
| DNS | A 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
Scan to try LovableOr tap the code on mobileSources 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
Content and SEO
How to Export WordPress Content for a Lovable Rebuild: WXR, REST API, WP-CLI and Media
What each WordPress export method includes and leaves out, how to get your images and SEO fields out, and what to do about page builders, shortcodes and custom fields.
Migration guide
The WordPress-to-Lovable Pre-Migration Audit: What to Find Before You Build
How to find out who controls your domain, DNS, hosting and email, list every URL, and inventory the plugins, forms and scripts your WordPress site depends on.
Technical topics
When and How to Switch Off WordPress and Cancel Hosting After Moving to Lovable
The safe order for retiring a WordPress site after launch: what to keep, what to check before cancelling hosting and plugin licences, and the things that are easy to lose.
Migration guide
How to Move a WordPress Website to Lovable: The Complete, Careful Migration Guide
The full 15-stage process for rebuilding a WordPress site in Lovable: audit, export, build privately, map redirects, cut over DNS without breaking email, then test and monitor.


