Migrating your WordPress website: a step-by-step guide to a hassle-free move
Want to migrate your wordpress site to a different hosting provider? The wordpress migration process requires careful preparation to prevent data loss. In this guide we show you how to safely and quickly carry out your wordpress migration.
Moving your WordPress website to new hosting can feel like a daunting undertaking, but with the right approach the process goes smoothly and without issues. Whether you're moving for better performance, lower costs, or because you're unhappy with your current support, this comprehensive step-by-step guide walks you through every phase of the migration. We cover both the manual method and using migration plugins, so you can choose the approach that fits your situation.
When is moving the right choice?
There are several legitimate reasons to migrate your WordPress site to different hosting. Your site may have become slow and your current hosting can't handle the growth. Maybe you're unhappy with customer service and aren't getting adequate help with problems. Or you've found better pricing elsewhere and want to save costs without sacrificing quality.
Other reasons might be that your hosting doesn't support the latest PHP version, you need more advanced features such as staging environments or better security, or your current provider is simply shutting down. Whatever the reason, a well-executed migration ensures a seamless transition without data loss or extended downtime.
How do you prepare?
Before you start the actual migration, gather all the information you'll need. This prevents frustration halfway through the process when you discover you're missing a crucial piece of information.
From your new hosting you'll need
FTP or SFTP login details including server, username, password, and port number. Access to the control panel where you can create databases. The nameservers if you want your DNS to run through the hosting. The IP address of your new server for testing before you change DNS.
For your domain
Access to your domain registrar where you can change the DNS settings. This isn't always the same party as your hosting. Note your current DNS settings before making changes, so you can roll back if needed.
From your current hosting
Make sure you have a complete backup or access to create one. Check that you keep access for at least a week after the migration in case problems come up that you need to fix.
Step 1: create a complete backup of your current site
This is by far the most important step of the entire process. Without a full, working backup you risk permanent data loss. Back up all WordPress files including the wp-content folder with all your uploads, themes, and plugins. Also export the full MySQL database.
Backup with UpdraftPlus
If you use UpdraftPlus, go to Settings > UpdraftPlus Backups in your WordPress dashboard. Click "Backup Now" and select both options for database and files. Wait until the backup is fully complete. Download all backup components to your local computer so you have a copy independent of both servers.
Backup with Duplicator
Duplicator creates a handy installable package that simplifies the migration. Install the plugin and go to Duplicator > Packages. Click "Create New" and go through the wizard. After completion you download two files: installer.php and the archive file. Keep both safe on your computer.
Manual backup
Connect via FTP to your current server and download the complete WordPress folder to your computer. Log in to phpMyAdmin, select your WordPress database, click "Export" and choose "Quick" with SQL format. Download the resulting SQL file.
Step 2: prepare the new server
Create a database
Log in to the control panel of your new hosting, usually cPanel or Plesk. Go to MySQL Databases and create a new database with a recognizable name. Then create a database user with a strong password. Link the user to the database and grant all privileges. Note the database name, username, and password carefully.
Check PHP settings
Make sure the PHP version on your new hosting matches or is newer than what your current site uses. Also check that the required PHP extensions are enabled and that memory limits are sufficient for your site. This prevents problems after the migration.
Step 3: upload files to the new server
Method A: manual FTP upload
Connect with an FTP client such as FileZilla to your new server. Navigate to the correct folder, usually public_html or www. Upload all the WordPress files you downloaded earlier. This can take a while depending on the size of your site and your internet speed. Large sites can benefit from first compressing files and extracting them via the control panel.
Method B: Duplicator installer
If you used Duplicator, this is much simpler. Upload just the installer.php and the archive file to the public_html folder of your new server. Then open installer.php in your browser via the temporary URL or IP address of your new server. Follow the installation wizard and enter the new database details when prompted. Duplicator extracts all files, imports the database, and updates the URLs automatically.
Step 4: import the database
If you're following the manual method, you need to import the database separately. Log in to phpMyAdmin on your new hosting. Select the empty database you created in step 2. Go to the "Import" tab and click "Choose File". Select the SQL file from your backup and click "Go". Wait until the import is complete, which can take a few minutes for large databases.
If you used Duplicator, this already happened automatically during the installation wizard and you can skip this step.
Step 5: configure wp-config.php
Open the wp-config.php file on your new server via FTP or your hosting's file manager. Update the database settings so they match your new database:
Change the database name to your new database name. Change the user to your new database user. Update the password to the new password. Check the host, often this is 'localhost' but some hosts use a different address.
Save the file. If you used Duplicator, these settings have already been updated correctly.
Step 6: test the site on the new server
Before you change DNS and give the world access to your new server, you need to thoroughly test that everything works. There are several ways to view your site on the new server without changing DNS.
Via the hosts file
Edit the hosts file on your computer to temporarily point your domain to the IP address of your new server. On Windows you'll find this file at C:\Windows\System32\drivers\etc\hosts. On Mac and Linux it's /etc/hosts. Add a line with the new IP address followed by your domain name.
Via a temporary URL
Many hosting providers offer a temporary URL that lets you view the site before your domain is linked. Check your hosting's welcome email for this information.
Test thoroughly
Test all important pages and check that they load correctly. Verify that images are displayed. Test forms by sending a test message. Check that you can log in to the admin. Test the functionality of key plugins. View the site on both desktop and mobile.
Fix any issues before proceeding. Take your time with this step, it's better to discover problems now than after the DNS change.
Step 7: change DNS to the new server
If everything is working to your satisfaction, it's time for the final step: pointing your domain to the new server. Log in to your domain registrar where your domain is registered.
Option A: change nameservers
The simplest method is changing the nameservers to those of your new hosting. You'll find these in your hosting's welcome email or documentation. Replace the current nameservers with the new ones. Make sure you fill in all the nameserver fields your hosting provides.
Option B: change the A-record
If you want to keep DNS with your current registrar, you can just change the A-record to point to the IP address of your new server. Don't forget to also update the A-record for www. This method gives you more control but requires you to manage DNS records yourself.
DNS propagation
After you change DNS, it can take 24-48 hours before the change is propagated worldwide. During this period, some visitors may see your old server and others your new one. Avoid making changes to your content on either server during this period. You can use tools like whatsmydns.net to track the progress of the propagation.
After the migration: wrap-up tasks
Check everything again
Wait 48 hours and then check your site again from different devices and networks. Verify that email still works correctly if it runs through your hosting. Check Google Search Console for any crawl errors. Test all forms and functionality again.
Update hardcoded URLs
If you switched domains or moved from HTTP to HTTPS, use a plugin such as Better Search Replace to update old URLs in your database. This prevents mixed content warnings and broken links.
Keep your old hosting temporarily
Don't cancel your old hosting right away. Keep it active for at least a week as a safety net in case unexpected problems come up. Only once you're certain everything is stable can you cancel the old hosting and say goodbye for good.
Create a fresh backup
Now that your migration is complete, create a new complete backup on your new hosting. This becomes your new baseline for future backups. Reconfigure your backup plugin with the right schedule and storage locations.
WordPress migration requires care and attention to detail, but with this step-by-step guide the process should go smoothly. Take your time, test thoroughly, and your website will soon be in a better place where it can grow and thrive.
How do you compare wordpress migration methods?
There are several ways to carry out your wordpress migration. The best method depends on your technical knowledge and the size of your website.
| Method | Suitable for | Downtime | Complexity |
|---|---|---|---|
| Plugin (Duplicator) | Small sites | Minimal | Low |
| Plugin (All-in-One WP) | All sites | Minimal | Low |
| Manual (FTP+DB) | Advanced users | Moderate | High |
| Provider migration | All sites | None | Low |
Checklist for wordpress migration
- Create a full backup before you start your wordpress migration
- Choose a reliable WordPress hosting provider as your new destination
- Check that the PHP version is compatible on the new web hosting
- Update all plugins and themes before the wordpress migration begins
- Verify your domain name DNS settings after the migration
- Test your website thoroughly after the wordpress migration on the new server
- Install an SSL certificate on the new hosting
A successful wordpress migration requires patience and a structured approach. Consider WooCommerce hosting if your webshop also needs to move along.
WordPress migration: optimizing after the move
After a successful wordpress migration, it's essential to optimize your website for the new server environment. Start by checking and updating all URLs in the database. Use a tool such as Better Search Replace to replace old URLs with new ones. Be careful to handle serialized data correctly, since a simple search-and-replace in the database corrupts serialized PHP arrays and objects.
Next, check all pages for broken links and missing images. A migration can cause file paths to no longer match, especially if the folder structure on the new server is different. Use a broken link checker plugin or an online tool to scan all links. Fix any issues found right away, since broken links hurt both the user experience and your SEO score.
Also optimize database performance after the migration. WordPress databases accumulate overhead over time from deleted revisions, spam comments, and temporary transients. Use a plugin such as WP-Optimize to clean up and optimize the database. This improves your website's load time and reduces server load. Then reconfigure caching on the new server.
Avoiding common mistakes in WordPress migration
A WordPress migration is a delicate operation where many things can go wrong. By knowing the most common mistakes, you can avoid them and achieve a flawless migration.
| Mistake | Consequence | Solution |
|---|---|---|
| No backup made | Data loss if something goes wrong | Always create a full backup of files and database |
| PHP version differs | Errors and blank pages | Check the PHP version on both servers beforehand |
| wp-config.php not updated | Database connection fails | Update database details for the new server |
| Incorrect file permissions | Uploads and updates fail | Set folders to 755, files to 644 |
| Old cache not cleared | Visitors see old content | Clear all caches after the migration |
Another often-forgotten step is updating your DNS settings. After the migration, your A-records and any CNAME records need to point to the IP address of the new server. Lower the TTL of your DNS records to 300 seconds a day before the migration, so DNS propagation happens faster. After the migration you can set the TTL back to the default value.
WordPress migration: manual versus plugins
You can migrate WordPress in two ways: manually or using a migration plugin. Both methods have pros and cons that depend on your technical knowledge and the complexity of your website.
A manual migration gives you complete control over the process. You export the database via phpMyAdmin, copy all files via FTP, and adjust the configuration manually. This is the method for advanced users and developers. The advantage is that you know exactly what's happening and can fix problems right away. The downside is that it's time-consuming and requires knowledge of databases and server configuration.
Migration plugins such as Duplicator, All-in-One WP Migration, and UpdraftPlus make the process considerably simpler. These plugins package your entire website including the database into a single package you can restore on the new server. The advantage is the ease and speed. The downside is that large websites run into limits with the free versions of these plugins. For websites larger than 500 MB you'll usually need the premium version. Whichever method you choose, always create a complete backup first before you begin.
How do you choose the best timing for wordpress migration?
The timing of your wordpress migration project matters more than you'd think. Plan the migration for a time with low traffic. For most websites this is at night or on the weekend, typically between 2am and 6am. Check your Google Analytics to identify the quietest moment. A migration during peak hours means more visitors encountering an offline or broken website.
Avoid migrations right before important events or campaigns. If you're planning a marketing campaign for next week, carry out the migration at least two weeks earlier. This gives you enough time to fix any problems before it really matters. Also avoid periods around search engine updates, since a migration combined with an algorithm update can make it hard to analyze any ranking changes.
Communicate the migration in advance to your team and any clients. Set up a maintenance page that informs visitors about the temporary unavailability and the expected time of return. After the migration, monitor your website closely for the first 48 hours. Check that all pages load correctly, forms work, and orders are processed correctly. Use uptime monitoring for continuous monitoring during this critical period.
Conclusion: a successful WordPress migration in six steps
A WordPress migration doesn't have to be stressful if you follow the right steps. Start with a complete backup, choose the right timing, use reliable tools, and test thoroughly after the migration. Whether you choose a manual approach or a migration plugin, careful preparation is the key to success. By avoiding common mistakes and optimizing your website for the new server environment after the migration, you get the most out of the move to a better hosting provider.