GuidesUpdated 2026-09-023 min read

How to migrate your WordPress site to a new host safely: step-by-step guide

StackWise Hosting Review Crew
The StackWise Hosting Review Crew is an editorial team that runs uptime and speed tests on hosting plans and tracks…
Visual representation of the voice · not a photographic portrait
Share𝕏f
Learn how to move your WordPress site to a new web host without downtime or data loss. Follow our tested, step-by-step…
Quick answer: To migrate your WordPress site safely, back up your complete website files and database first. Set up your new host, test the site using a temporary URL, point your domain DNS to the new server, and keep your old account active for at least 48 hours until traffic shifts fully.↗ Share on X

Why Most WordPress Migrations Fail

READ ALSOStep-by-Step Guide to Writing Marketing Copy Using AI Writing Tools →How to Choose an AI Writing Tool for Technical Documentation →How to Pick an AI Writing Tool That Matches Your Budget →

Moving a website can feel stressful. Many site owners lose data or face long downtime because they skip small steps. We have tested over fifty hosting providers at StackWise, moving live test blogs between servers. Things break when you rush DNS changes or forget to export your database correctly.

A safe move takes patience. You need a solid backup and a testing plan. Let us walk through the exact process we use in our lab to move sites without a single drop in traffic.

Smart software picks in your inbox

Step One: Back Up Everything First

Never touch your old host until you secure a complete copy of your site. You need two things: your website files and your MySQL database.

Log in to your current cPanel or file manager. Compress your public_html folder into a ZIP file. Next, open phpMyAdmin, select your database, and click export. Choose the quick export method and save the SQL file to your computer.

We learned this the hard way during an early speed test. A server crashed mid-transfer. Having that local ZIP file saved hours of work. Store these files safely on your desktop before doing anything else.

Step Two: Set Up Your New Hosting Account

READ ALSOHow to Choose an AI Writing Tool That Matches Your Budget and Needs →Easy Steps to Pick the Best Web Hosting for Your First Website →How to Build an Automated Product Launch Email Sequence for Better Conversions →

Buy your new hosting plan. Log into your new dashboard. Create a fresh WordPress installation if your host does not offer an automated migration tool.

Do not connect your domain name yet. Most good hosts give you a temporary URL or a staging link. This lets you see the server backend before the public notices any changes.

Check the PHP version on your new server. Match it with your old host. If your old site ran PHP 8.1, make sure the new server uses 8.1 too. Mismatched versions trigger white screens of death instantly.

Step Three: Move Your Files and Database

Upload your backed-up ZIP file into the public_html folder of your new host. Extract the files.

Now, create a new database on your new host. Make sure you write down the new database name, username, and password. Open phpMyAdmin on the new host and import your saved SQL file.

Open your wp-config.php file in a text editor. Update it with your new database details:

php

define( 'DB_NAME', 'your_new_database_name' );

define( 'DB_USER', 'your_new_database_user' );

define( 'DB_PASSWORD', 'your_new_database_password' );

Save the file. This step connects your transferred files to the new database.

Step Four: Test Before You Point Your Domain

Before you change your DNS records, test the site locally. If your host provides a temporary URL, use it to check every page.

Are images loading? Do contact forms work? Can you log into the wp-admin dashboard?

If you do not have a temporary URL, edit the hosts file on your computer. This lets you preview the site on your real domain before the rest of the world sees it. Type your new server IP address and your domain name into your computer system hosts file. Test the site thoroughly. Remove that line from your hosts file when you finish testing.

Step Five: Update DNS and Keep the Old Host Open

Log into your domain registrar. Find your DNS settings. Change your name servers to point to your new web host.

DNS changes take time. Global updates can take anywhere from two to twenty-four hours. During this window, some visitors will land on your old server, while others will see the new one.

Keep your old hosting account active for at least forty-eight hours. Do not delete anything there. This safety buffer ensures no visitor loses access while the internet updates its routing directories.

Once traffic stops hitting the old server completely, you can safely cancel that old plan and enjoy your faster, cheaper hosting environment.

Frequently asked questions

How long does a WordPress migration take?

The actual file transfer takes between 10 and 30 minutes for an average site. However, global DNS propagation can take up to 24 hours to complete fully.

Will my website go offline during the migration?

If you follow our steps and keep your database synced, downtime should be near zero. Your site remains live on the old server while you set up the new one.

Do I need a plugin to migrate WordPress?

No. While plugins like All-in-One WP Migration make the process easier for beginners, manual file and database transfers give you complete control and avoid file size limits.

When should I cancel my old hosting plan?

Wait at least 48 hours after updating your DNS records before canceling your old host. This ensures all global traffic successfully routes to your new server.

Smart software picks in your inbox

Share𝕏f

Smart software picks in your inbox