Back up WordPress and prove you can restore it
Take a complete WordPress backup, store it off the server, and restore it to a staging subdomain to prove it works.
On this page
- What you’ll need
- Step 1: Export the database
- Step 2: Archive the files
- Step 3: Store both off the server
- Step 4: Create a staging subdomain
- Step 5: Create a new database
- Step 6: Restore files and database
- Step 7: Point the copy at its database and address
- Step 8: Check it
- Step 9: Clean up
- Check it worked
- If something goes wrong
- Level
- Intermediate
- Time
- About 45 min
- Steps
- 9
- You’ll finish with
- A working result, checked
9 steps
What you’ll need
- WordPress admin and DirectAdmin access
- Cloud storage or space on your computer
Most people discover their backup doesn’t work at the moment they need it. This tutorial ends with a working restored copy, so you know yours does.
Step 1: Export the database
In phpMyAdmin, select the WordPress database (DB_NAME in wp-config.php), Export → Custom → gzipped. How to export a database (backup with phpMyAdmin)
Step 2: Archive the files
In System Info & Files › File Manager, compress the WordPress folder and download the archive, then delete it from the server. How to download files from your hosting account
Step 3: Store both off the server
Put both files in a dated folder in cloud storage, such as 2026-09-15-yoursite.
Step 4: Create a staging subdomain
Create restore-test.yourdomain.co.uk. How to create a subdomain
Step 5: Create a new database
Create a separate database and user for the test. How to create a MySQL database in DirectAdmin
Step 6: Restore files and database
Upload and extract the file archive into the subdomain’s folder, and import the database export into the new database. How to import a database with phpMyAdmin
Step 7: Point the copy at its database and address
Edit the copy’s wp-config.php with the new database details, and add WP_HOME and WP_SITEURL set to the subdomain address. How to change your WordPress site URL
Step 8: Check it
Load the subdomain, log in, and open a few posts and pages. Images may point to the live site; that’s fine for a restore test.
Step 9: Clean up
Delete the subdomain, its folder and the test database, so they don’t use space or get indexed.
Check it worked
The restored copy loads, you can log in, and recent posts are present — proving your backup files are complete.
If something goes wrong
| What happens | What to do |
|---|---|
| Redirects to the live site | WP_HOME/WP_SITEURL missing from the copy’s wp-config.php. |
| Database connection error | Prefixed names or password in the copy’s config. “Error establishing a database connection” in WordPress |
| Import too large | Importing a database that’s too large for phpMyAdmin |
Not hosting with Traxio yet? WordPress hosting from 99p a month is £0.99 a month.
Where this fits: Web hosting for beginners brings together everything you need for a first website, in order.
Spotted something out of date or unclear? Tell us and we’ll fix it.