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.

IntermediateAbout 45 minutes9 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.

Steps

  1. 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)

  2. Step 2: Archive the files

    In System Info & Files then File Manager, compress the WordPress folder and download the archive, then delete it from the server. How to download files from your hosting account

  3. Step 3: Store both off the server

    Put both files in a dated folder in cloud storage, such as 2026-09-15-yoursite.

  4. Step 4: Create a staging subdomain

    Create restore-test.yourdomain.co.uk. How to create a subdomain

  5. Step 5: Create a new database

    Create a separate database and user for the test. How to create a MySQL database in DirectAdmin

  6. 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

  7. 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

  8. 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.

  9. 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 happensWhat to do
Redirects to the live siteWP_HOME/WP_SITEURL missing from the copy’s wp-config.php.
Database connection errorPrefixed names or password in the copy’s config. “Error establishing a database connection” in WordPress
Import too largeImporting a database that’s too large for phpMyAdmin

Not hosting with Traxio yet? WordPress hosting from 99p a month is free for 30 days with no card, then £0.99 a month.

Popular

Tip: press / to search from any pageSee all results