Skip to content
GPLWP Guides

How to back up and migrate a WordPress site

Backup & Migration Time About 30–90 minutes 6 steps Updated 10 Sep 2026

BACKUP & MIGRATION
The short answer

A complete WordPress backup includes the database and site files, including themes, plugins, uploads and configuration. You can move them manually with SFTP and phpMyAdmin, but a migration plugin is faster and safer when URLs, serialized data or large sites are involved.

The route
  1. 01Record the current site
  2. 02Create a manual backup
  3. 03Prepare the new hosting
  4. 04Update the site URLs
  5. 05Test before switching over
  6. 06Use the fast migration route

What you need

  • Administrator access to the WordPress dashboard
  • SFTP or hosting file-manager access
  • Access to the source and destination databases
  • The new host's database name, username, password and server details

Record the current site

Write down the current domain, WordPress address, PHP version, database name, table prefix and active theme and plugins. For a WooCommerce site, schedule the move for a quiet period and prevent new orders during the final copy so the database does not change while you are moving it.

Check that the destination host has enough disk space and supports the PHP and database versions your site needs. Keep the old site available until the new copy has passed your checks.

Create a manual backup

A full backup has two separate parts: the WordPress files and the database. Download the site files with SFTP or your host's file manager, including wp-content, wp-config.php, the WordPress core files and server configuration files that belong to the site. Export the database as an SQL file using phpMyAdmin or your host's database tool.

Store both parts together in a location outside the server, and label them with the date. Downloading the files alone is not enough because posts, pages, settings, users and orders are stored in the database. WordPress recommends backing up the database before a move and treating the files and database as one backup set.

Prepare the new hosting

Create the destination database and database user, then grant that user access to the database. Upload the WordPress files to the new document root and import the SQL export into the empty destination database through phpMyAdmin or the host's database tool.

Update wp-config.php with the destination database name, username, password and host if those values changed. A mismatch here commonly produces a database connection error even when the files were copied correctly.

Update the site URLs

If the domain or installation path changed, update the WordPress and site addresses in the new database or through the WordPress settings when you can still access the dashboard. Replace old URLs in the database with a method that understands serialized data, such as a suitable migration tool or WP-CLI search-and-replace, rather than using a plain text replacement across the SQL file.

Unserialised values can contain their character length, so a basic find-and-replace can corrupt widget, theme or plugin settings. WordPress specifically warns about this migration mistake.

Test before switching over

Open the new site using its temporary URL, hosts-file entry or preview address. Check the home page, several internal links, images, forms, logins, search, uploads, scheduled tasks and the WordPress dashboard. Test checkout, payment callbacks, email notifications and order history separately on a store.

If pages return 404 errors, save the permalink settings again to refresh rewrite rules. If the site shows a critical error, check the PHP version, plugin and theme compatibility, database credentials and server error log before changing more files. Do not delete the old site until the new copy works and you have a second backup.

Use the fast migration route

For a routine move, install Duplicator Pro on the source site, create a complete backup package, download or send it to the chosen storage location, and install that package on the destination site. The package contains the site files and a database copy, while the installer guides the database connection and URL replacement steps. Duplicator's documented workflow is to create the backup, copy it to the new location and run the installer; Pro also supports scheduled backups, cloud storage, cloning and recovery options.

This is the faster choice when you move sites regularly, work with large media libraries, need scheduled off-site backups or want to clone a site for staging. The manual route is still fine for a small site when you are comfortable with SFTP, phpMyAdmin and database troubleshooting.

The fast route

Let Duplicator Pro Plugin do it

Combines scheduled backups, cloud storage, cloning, and one-click migrations for moving or staging complete WordPress sites.

Get Duplicator Pro Plugin

Sources

  1. developer.wordpress.org /advanced-administration/security/backup/?utm_source=openai
  2. developer.wordpress.org /advanced-administration/upgrade/migrating/?utm_source=opena…
  3. duplicator.com /knowledge-base-article-categories/quick-start/?utm_source=o…

Questions

What must a complete WordPress backup contain?
A complete WordPress backup must contain both the database and the site files. The database holds content, users, settings and other dynamic data, while the files contain WordPress core, themes, plugins, uploads and configuration. Keep the database export and file copy together, because restoring only one part will not recreate the working site.
Can I migrate WordPress without a plugin?
Yes, you can migrate WordPress manually with SFTP, a database export and an import tool such as phpMyAdmin. You must copy the files, create a destination database, import the SQL file, update the database credentials and safely replace changed URLs. The process is reasonable for a small site, but it is easier to make mistakes with serialized data, large files and missed configuration.
Why does the site break after changing its domain?
The site often breaks because the database still contains the old domain or because URLs were replaced without accounting for serialized values. Update the site addresses and perform a serialization-aware search and replace. Also check <code>wp-config.php</code>, permalink rules, cached files and hard-coded URLs in theme or plugin settings.
Should I keep the old WordPress site after migration?
Yes, keep the old site intact until the new site has passed functional checks and you have verified a fresh backup. Leave DNS or the old hosting available long enough to catch missing images, broken forms, failed emails and store issues. Once traffic is working on the destination, restrict or remove the old copy so visitors cannot submit data to the wrong site.