Aller au contenu principal
Performance

WordPress migration to a new host without downtime

Key takeaways

  • Table of Contents
  • Before migration: prepare yourself
  • Step 1: Back up your complete site

Category: Performance | Reading time: 14 min

Changing hosting providers is a decision most WordPress site owners eventually face. Whether for reasons of performance, cost, support, or features, migration is a process that can seem intimidating. The good news? With the right methodology, you can migrate your WordPress site to a new host without any service interruption.

In this article, we guide you step by step through the migration process, from preparation to post-migration monitoring, including recommended tools and errors to avoid.

Before migration: prepare yourself

Preparation is the key to a successful migration. Here's what you need to do before even starting:

Pre-checks

  • Verify technical requirements of the new host (PHP version, MySQL, disk space)
  • Note your current configuration: PHP version, installed extensions, database size
  • List your dependent services: email, DNS, CDN, SSL certificate
  • Choose the right time: migrate during a low-traffic period
  • Inform your team: if multiple people administer the site

Choosing the new host

Before migrating, make sure your new host meets your needs:

  • Disk space: sufficient for your current files and future growth
  • Bandwidth: suited to your traffic
  • Technical support: responsive and competent, especially in case of migration issues
  • Automatic backups: for your peace of mind
  • Geographic location: close to your main audience

Step 1: Back up your complete site

Before any migration operation, create a complete backup of your site. This is your safety net in case of problems.

What to back up

  1. All WordPress files: themes, plugins, uploads, system files
  2. The complete database: all tables, without exception
  3. Configuration files: wp-config.php, .htaccess
  4. Emails if you use your host's email services

Backup methods

  • Backup plugins: UpdraftPlus, BackupBuddy, WP-Clone
  • Control panel: most hosts offer complete backups
  • FTP + phpMyAdmin: manual but reliable method
  • WP-CLI: for advanced users

"Never start a migration without a backup. A backup takes you 15 minutes; a complete restoration can take hours."

Step 2: Configure the new hosting

Before migrating your data, you need to prepare your new hosting:

  1. Create an account on your new host
  2. Install WordPress: most hosts offer one-click installation
  3. Check the PHP version: it must be compatible with your plugins and themes
  4. Create a database: note the credentials (username, password, database name)
  5. Enable SSL: make sure the SSL certificate is installed

Tip: Don't deactivate your old hosting during this step. Both servers must run simultaneously.

Step 3: Migrate files

Transfer all your WordPress files to the new hosting. There are several methods:

Method 1: Via control panel

Many hosts offer built-in migration tools. If your old host offers an export, use it.

Method 2: Via FTP

  1. Connect to your old server via FTP
  2. Download all files from the WordPress root
  3. Connect to the new hosting
  4. Upload all files to the root directory

Method 3: Via SSH

For advanced users, SSH is the fastest method:

  • tar -czvf backup.tar.gz /path/to/wordpress on the old server
  • scp backup.tar.gz user@new-server:/path/to/wordpress/
  • tar -xzvf backup.tar.gz on the new server

Method 4: Via plugin

Plugins like Duplicator or All-in-One WP Migration greatly simplify the process. They create a complete package that you just need to install on the new server.

Step 4: Migrate the database

This is the most critical step. The database contains all your content, settings, and configurations.

Database export

  1. Connect to phpMyAdmin on your old hosting
  2. Select your WordPress database
  3. Click on the "Export" tab
  4. Choose "Quick" and SQL format
  5. Click "Go" to download the .sql file

Database import

  1. Connect to phpMyAdmin on the new hosting
  2. Select the database you created
  3. Click "Import"
  4. Select your .sql file
  5. Click "Go"

Modifying wp-config.php

After import, you need to modify the wp-config.php file to point to the new database:

define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_user');
define('DB_PASSWORD', 'new_password');
define('DB_HOST', 'localhost');

You must also update the table prefix if different, and verify URLs in the wp_options table.

Step 5: Test before switching

Before switching your DNS, test your site on the new hosting. This is the most important step to avoid problems.

How to test without switching DNS

  • Hosts file modification: edit your computer's hosts file to point to the new IP
  • Browser extension: use an extension like "Host Switcher" to test
  • Temporary URL: some hosts offer a temporary URL for testing

Test checklist

  1. ✅ The site displays correctly
  2. ✅ All pages are accessible
  3. ✅ Images and media load
  4. ✅ Forms work
  5. ✅ Admin login works
  6. ✅ Permalinks are correct
  7. ✅ Emails are functional
  8. ✅ SSL is active
  9. ✅ Redirects work

Step 6: Switch DNS

Once all tests are validated, you can switch your DNS records to the new hosting. This is the moment when your site officially moves to the new server.

DNS modification

  1. Log in to your domain registrar
  2. Modify the A records to point to the new IP
  3. Update the NS record if necessary
  4. Save changes

DNS propagation

DNS propagation can take 24 to 72 hours, although it's usually much faster (a few hours). During this period:

  • Some visitors will see the old site, others the new one
  • Don't modify your site during propagation
  • Use a tool like whatsmydns.net to check propagation
  • Keep your old hosting active until you confirm the new site works correctly for all visitors

Important tip

To reduce downtime, lower your DNS TTL 48 hours before migration (for example to 300 seconds). This will speed up propagation during the switch.

Step 7: Verify and clean up

After DNS propagation, verify that everything works correctly on the new hosting:

Post-migration checks

  • Test the site from different devices and browsers
  • Check error logs on the new hosting
  • Test performance with GTmetrix or PageSpeed Insights
  • Verify emails: sending and receiving
  • Check SSL: valid and active certificate
  • Test forms: contact and transactional pages

Cleanup

  • Delete old backups on the old hosting
  • Deactivate old hosting after confirming everything works
  • Update URLs in your database if necessary (use Better Search Replace)
  • Optimize your database with WP-Optimize

Recommended migration tools

Here are the tools we recommend to simplify your migration:

Migration plugins

  • Duplicator: creates a complete package of your site (files + database). Ideal for complete migrations.
  • All-in-One WP Migration: simple interface, export/import in a few clicks. Excellent for beginners.
  • WP Migrate: advanced migration with URL and path management. Ideal for developers.
  • UpdraftPlus: backup and restoration, with integrated migration

Diagnostic tools

  • phpMyAdmin: database management and modification
  • WP-CLI: command line for advanced operations
  • Query Monitor: query and error analysis
  • Better Search Replace: bulk URL modification

Rollback plan

Even with impeccable preparation, problems can occur. Always have a rollback plan in place before you begin the migration process.

In case of problems

  1. Don't panic: you have a complete backup
  2. DNS rollback: restore old DNS records in case of critical problems
  3. Contact your old host: make sure the old site is still active
  4. Identify the problem: check logs, test each component
  5. Fix and retry: resolve the issue before retrying migration

"A rollback plan isn't a sign of pessimism; it's a mark of professionalism. The best experts always have a Plan B."

Common errors to avoid

Most frequent errors

  • Forgetting the backup: the most serious and most avoidable error
  • Not testing before switching: always verify on the new hosting
  • Migrating during peak hours: choose a low-traffic period
  • Forgetting redirects: old URLs must redirect to new ones
  • Neglecting SSL: verify the certificate is active after migration
  • Forgetting emails: verify emails still work
  • Not cleaning the database: optimize after migration
  • Forgetting cron jobs: verify scheduled tasks work
  • Missing cron jobs: scheduled tasks like backups or newsletter sends may break after migration if the cron system isn't properly configured on the new server
  • Not checking plugin licenses: some premium plugins validate licenses based on the domain, and a server change can trigger deactivation

Conclusion

Migrating a WordPress site to a new host is not an operation to take lightly, but it's quite manageable with the right methodology. By following these steps and taking the time to properly prepare each phase, you can migrate your site without service interruption.

At WpDefender, we perform WordPress migrations for our clients securely and professionally. Our team handles every detail so you can focus on your business.

Need help migrating your WordPress site?

Our team handles your migration securely, without downtime and without data loss.

Request a migration quote

Related articles: 15 optimizations to speed up WordPress | Caching plugins comparison | Troubleshooting WordPress errors

Your site is compromised? We take care of everything.

Don't waste time. Every minute counts for your traffic and SEO.

Need urgent help? Scan my site
Available now — Response within 30 minutes Immediate intervention
🛡️
WpDefender Bot Online now

Hello! I'm the WpDefender assistant. How can I help you?

Select your problem: