
Introduction
Migrating a WordPress site to a new server – whether for cloning a project, switching hosting providers, or setting up a staging copy – is a common task for developers. A safe, smooth WordPress server migration requires careful planning and attention to detail. In this guide, we’ll walk through how to migrate a WordPress site to a new server step by step, with a focus on doing it safely and avoiding downtime or data loss. We’ll start with a pre-migration checklist (covering backups, staging environments, and DNS precautions) and then proceed through exporting your site’s files and database, setting up the new server (using a Plesk control panel as an example), updating configuration and URLs, and finally debugging and fixing any post-migration issues. Throughout, we’ll share safe WordPress migration tips, code examples (SQL queries, PHP config edits), FTP pointers (using FileZilla), and tool recommendations to ensure the process is as smooth as possible. Let’s get started!
1. Pre-Migration Checklist: Backups, Staging Environment, and DNS Safety
Before you begin the migration, take time to prepare. Moving a site can be risky, so a pre-migration checklist will help you avoid common pitfalls:
Full Backup: Always back up your entire WordPress site (files and database) before migrating. Even though you’ll be copying the site, having a separate backup ensures you can restore the original if anything goes wrong. You can use a plugin like UpdraftPlus or Duplicator to generate a backup, or manually zip your
wp-content
folder and export the database.Staging Environment: If possible, perform the migration on a staging site or local environment first, rather than directly on the live site. Testing in a non-production environment prevents breaking the live site if issues occur. Many hosts (and Plesk’s WordPress Toolkit) support creating a staging clone. This way you can verify everything on the new server before making it live.
DNS Precautions: Plan your DNS switch carefully. Until you’re ready to go live on the new server, keep the domain’s DNS pointing to the old host. You can preview the new site either on a temporary domain or by editing your local hosts file to point the domain to the new server’s IP (so only your computer sees the new server). This avoids visitors or search engines seeing a half-finished migrated site. Also, on the new site, consider temporarily discouraging search indexing (WordPress setting under Reading) so that the staging copy doesn’t get indexed by Google.
Verify Credentials and Access: Make sure you have all the necessary access info for both servers: FTP/SFTP logins, database credentials, Plesk or cPanel logins, phpMyAdmin access, etc. Having these on hand will make the process faster.
Environment Differences: Note any differences in server environment (PHP version, SSL certificates, etc.). Ensure required PHP extensions are enabled on the new server for your theme/plugins. Also, if your site uses SMTP or external integrations, be mindful that on a clone those might still point to production services – disable or reconfigure as needed to prevent unintended emails or API calls during testing.
By completing this checklist, you reduce the chance of surprises during the migration. Once backups are in place and your environment is prepared, you’re ready to start the actual migration.
Discover more from TechBooky
Subscribe to get the latest posts sent to your email.