Migrating a WordPress site to a new host can sound scary. It feels like moving a whole house while the lights are still on. But do not panic. With the right steps, you can move your site safely, calmly, and maybe even with a tiny victory dance at the end.
TLDR: Back up your WordPress files and database first. Move them to the new host, create a fresh database, update your settings, and test everything before changing your domain’s DNS. Take it slow, check each step, and keep your old hosting active until the new site works perfectly.
Before You Start: What Are You Actually Moving?
A WordPress site has two main parts.
- Files: These include your themes, plugins, images, uploads, and WordPress core files.
- Database: This stores your posts, pages, comments, settings, users, and plugin data.
Think of the files as the furniture. Think of the database as the memory of the house. You need both. If you only move one, your site may look empty, broken, or very confused.
You will also need access to a few things.
- Your old hosting account.
- Your new hosting account.
- Your WordPress admin login.
- Your domain registrar account.
- An FTP app, like FileZilla, or your host’s file manager.
- phpMyAdmin, or another database tool.
Ready? Grab a drink. Let us pack the website suitcase.
Step 1: Choose Your New Host
Before you move, make sure your new host is ready. Do not pick a host only because it is cheap. Cheap hosting can be like a wobbly chair. It works until someone sits down too fast.
Look for these features:
- Good speed: Your site should load fast.
- Reliable uptime: Your site should stay online.
- SSL support: You need HTTPS.
- Easy backups: Because accidents happen.
- WordPress support: Helpful support is gold.
- Enough storage: Especially if you have many images.
Once your new hosting account is active, do not change your domain yet. That comes later. First, you need to move your site and test it.
Step 2: Clean Up Your Current WordPress Site
Before moving, tidy up. Nobody wants to carry old junk to a new home.
Log in to your WordPress dashboard. Then do a quick cleanup.
- Delete plugins you do not use.
- Delete themes you do not use.
- Empty spam comments.
- Clear cache from caching plugins.
- Update WordPress, themes, and plugins if safe.
Important: If your site is very old or has custom code, be careful with updates. Updates are usually good. But sometimes they surprise you like a cat jumping from a box.
Step 3: Back Up Your Website Files
Now it is time to back up your WordPress files. This is your safety net. Do not skip it. Skipping backups is how websites become ghost stories.
You can do this in two common ways.
Option A: Use File Manager
- Log in to your old hosting control panel.
- Open File Manager.
- Go to your site’s root folder. It is often called public_html.
- Select all WordPress files and folders.
- Compress them into a ZIP file.
- Download the ZIP file to your computer.
Option B: Use FTP
- Open your FTP app.
- Connect to your old host.
- Find your WordPress folder.
- Download all files to your computer.
This may take a while. Big sites have many images. Let it finish. Go stretch. Your website is doing suitcase yoga.
Step 4: Export Your WordPress Database
Your database is just as important as your files. It holds your content and settings.
To export it:
- Log in to your old hosting control panel.
- Open phpMyAdmin.
- Select your WordPress database.
- Click Export.
- Choose the Quick export method.
- Choose SQL as the format.
- Click Go.
You should now have an .sql file on your computer. Keep it safe. This file is like your site’s brain in a little digital jar.
Step 5: Create a New Database on the New Host
Now move to your new hosting account. You need a fresh database for WordPress.
In your new hosting control panel, look for MySQL Databases or a similar tool.
- Create a new database.
- Create a new database user.
- Set a strong password.
- Add the user to the database.
- Give the user All Privileges.
Write down these details:
- Database name
- Database username
- Database password
- Database host, often localhost
You will need them soon. Do not store them in a random sticky note that can vanish into another dimension.
Step 6: Upload Your Files to the New Host
Now it is time to unpack your website on the new server.
If you downloaded a ZIP file, upload it to the new host using File Manager. Then extract it inside the correct folder. This is usually public_html, but it can vary.
If you used FTP, connect to your new hosting account. Then upload all WordPress files into the correct folder.
Make sure your main WordPress files are in the right place. You should see files like:
- wp-config.php
- wp-login.php
- index.php
- wp-content
- wp-admin
If these files are inside an extra folder by accident, your site may not load correctly. For example, do not place your site inside public_html/oldsite/ unless that is what you truly want.
Step 7: Import Your Database
Next, upload your old database into the new database you created.
- Go to the new host’s control panel.
- Open phpMyAdmin.
- Select your new database.
- Click Import.
- Choose your .sql file.
- Click Go.
If the import works, great. Give yourself a tiny high five.
If it fails, the file may be too large. In that case, ask your new host for help. Many hosts can import large databases for you. That is not cheating. That is using the tools available.
Step 8: Update the wp-config.php File
Your WordPress files still have the old database details. You need to update them.
Find the wp-config.php file in your WordPress folder. Open it carefully. Look for these lines:
define('DB_NAME', 'old_database_name');
define('DB_USER', 'old_database_user');
define('DB_PASSWORD', 'old_database_password');
define('DB_HOST', 'localhost');
Replace the old values with your new database details.
For example:
define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_database_user');
define('DB_PASSWORD', 'new_database_password');
define('DB_HOST', 'localhost');
Save the file.
Be careful: Do not remove quotes. Do not remove semicolons. PHP is picky. It notices tiny mistakes and gets dramatic.
Step 9: Test the Site Before Changing DNS
This step is very important. You want to test the new site before sending real visitors there.
Some hosts give you a temporary URL. You can use that to preview the site. Other hosts let you edit your computer’s hosts file. This makes only your computer see the site on the new server.
What should you test?
- Visit the home page.
- Click menus.
- Open blog posts.
- Check images.
- Test forms.
- Check the WordPress admin area.
- Test checkout if you run a shop.
- Check mobile layout.
If you see broken images or strange layouts, do not panic. It may be a cache issue. Clear your browser cache. Clear WordPress cache. Also check file paths and permissions.
Step 10: Update Your Domain DNS
Once the new site works, it is time to point your domain to the new host.
Log in to your domain registrar. Find the DNS or nameserver settings. Your new host will give you nameservers or DNS records.
You may need to update:
- Nameservers, such as ns1.examplehost.com and ns2.examplehost.com.
- A records, which point your domain to an IP address.
Follow your new host’s instructions. Save the changes.
DNS changes can take time. Sometimes they work in minutes. Sometimes they take up to 48 hours. This waiting period is called DNS propagation. It sounds fancy. It mostly means the internet is updating its address book.
Step 11: Install or Check Your SSL Certificate
After the domain points to the new host, check your SSL certificate. Your site should use HTTPS.
Many hosts offer free SSL certificates. Look for an SSL or security section in your hosting control panel. Enable SSL for your domain.
Then visit your site using:
https://yourdomain.com
If you see a lock icon in the browser, nice. If not, check for mixed content. Mixed content happens when some files still load with http instead of https.
You can fix this with a search and replace tool or a trusted WordPress plugin. Replace old HTTP URLs with HTTPS URLs.
Step 12: Check Permalinks
Sometimes links act weird after a move. This is common. It is usually easy to fix.
- Log in to WordPress.
- Go to Settings.
- Click Permalinks.
- Do not change anything.
- Click Save Changes.
This refreshes your permalink rules. It is like telling WordPress, “Please remember how doors work.”
Step 13: Test Everything Again
Now test your site again. Yes, again. Testing twice is better than apologizing to visitors later.
Check these areas:
- Pages: Make sure important pages load.
- Posts: Open several blog posts.
- Images: Look for missing media.
- Forms: Send a test message.
- Search: Try the site search.
- Login: Test admin access.
- Speed: Run a quick speed test.
- Analytics: Make sure tracking still works.
If you run WooCommerce, test the cart, checkout, email notifications, and payment gateway. Do this with a test product if possible. No one wants a checkout that behaves like a sleepy raccoon.
Step 14: Set Up Backups on the New Host
Your site has moved. Great. Now protect it.
Set up automatic backups right away. Store backups somewhere safe, not only on the same server. Good backup locations include cloud storage or an external backup service.
A good backup plan includes:
- Daily or weekly database backups.
- Regular file backups.
- Easy restore options.
- Backup copies stored off site.
Remember: A backup you cannot restore is just decoration. Test your backups from time to time.
Step 15: Keep the Old Hosting for a Few Days
Do not cancel your old hosting right away. Keep it for at least a few days. A week is even safer.
This gives you time to confirm that everything works. It also gives DNS time to fully update around the world.
Once you are sure the new site is healthy, you can cancel the old hosting. But before you do, download one final backup. Future you may thank present you with imaginary cake.
Common Migration Problems and Quick Fixes
Even careful migrations can hit bumps. Here are common issues.
White Screen of Death
This usually means a PHP error. Disable plugins by renaming the plugins folder inside wp-content. Then try again.
Error Establishing a Database Connection
Your database details are wrong, or the database user lacks permission. Check wp-config.php. Check the database name, user, password, and host.
Broken Images
Files may be missing. Or URLs may still point to the old location. Reupload the uploads folder. Then run a safe search and replace if needed.
404 Errors
Refresh permalinks. Go to Settings, then Permalinks, and click Save Changes.
Login Problems
Clear cookies and cache. Also check your site URL in the database. If needed, update the siteurl and home values in the WordPress options table.
Manual Migration vs Plugin Migration
This guide focuses on a manual migration. It gives you control. It also helps you understand how WordPress works.
But plugins can make migration easier. Some migration plugins bundle your files and database into one package. Then you upload that package to the new host.
A plugin migration can be great if:
- Your site is small or medium sized.
- You want a simpler process.
- Your host supports the plugin.
- You do not want to handle databases manually.
A manual migration may be better if:
- Your site is very large.
- You need more control.
- The plugin fails due to server limits.
- You are comfortable with files and databases.
Final Thoughts
Migrating a WordPress site to a new host is not magic. It is a checklist. Back up your files. Export your database. Upload everything to the new host. Update your database settings. Test the site. Then change DNS.
Go slowly. Keep backups. Test more than you think you need to. And do not cancel the old host too soon.
Once the move is complete, your site gets a fresh new home. Maybe it loads faster. Maybe it is more stable. Maybe it just feels happier. Either way, you did it. Your WordPress site has packed its bags, moved across the internet, and survived the journey like a champion.