Moving WordPress to a new host involves transferring your website files and database, configuring the new server, testing the migrated site, and then changing your domain’s DNS records. The safest approach is to keep the old hosting account active until the new site has been thoroughly tested. That gives you a fallback if something goes wrong during the transition.
For most WordPress sites, the migration itself is less difficult than it sounds. The critical parts are preserving the database, copying all required files, checking the site’s configuration on the new server, and timing the DNS change carefully. A migration plugin can simplify the process, but manual migration remains useful when a site is large, a plugin cannot handle the transfer, or you need greater control over the process.
Before you move: make a complete backup
Do not begin a hosting migration without a current backup.
A WordPress website consists primarily of two important components:
- The database — contains posts, pages, users, settings, comments and other structured content.
- The files — including WordPress core files, themes, plugins and uploaded media.
A complete migration needs both.
Your hosting provider may already create automatic backups, but create an additional backup immediately before migration if possible. Keep a copy somewhere separate from the old hosting account.
You should ideally have:
- A copy of the WordPress database
- A copy of the entire WordPress installation
- The
wp-contentdirectory - Your
wp-config.phpsettings - Any custom server configuration you rely on
- A record of your existing DNS settings
- Your current PHP and database versions
The purpose is not simply disaster recovery. It gives you a known point to return to if the migration produces unexpected problems.
Check the new host before starting
Before transferring anything, confirm that the new hosting account supports the requirements of your WordPress installation.
Check:
- Supported PHP versions
- MySQL or MariaDB compatibility
- SSL/HTTPS support
- Available storage
- Database limits
- CPU and memory resources
- WordPress compatibility
- Email requirements
- Backup facilities
- Staging functionality, if needed
This is particularly important if you are moving from an older hosting environment. A new server can have different PHP versions, database configurations or security restrictions that affect older plugins and themes.
If you are changing hosts because of performance problems, make sure the new service actually provides more appropriate resources rather than simply offering a different brand of hosting.
Decide whether to use a migration plugin
There are two common approaches.
Option 1: Use a migration plugin
For many ordinary WordPress websites, a migration plugin is the simplest approach.
Migration tools can package the site’s database and files and transfer or restore them on the new server.
This can eliminate many manual steps, particularly for people who are uncomfortable working with databases and server file systems.
The limitation is that migration plugins are not universal solutions. Very large websites, complicated hosting environments, unusual server configurations or restricted hosting accounts can cause problems.
You should also check the plugin’s current compatibility and storage limitations before relying on it.
Option 2: Migrate manually
A manual migration generally involves:
- Downloading the WordPress files
- Exporting the database
- Creating a database on the new host
- Uploading the files
- Importing the database
- Updating the database credentials
- Testing the site
- Changing DNS
It requires more technical knowledge, but gives you considerably more control.
For a large or business-critical website, manual migration—or assistance from someone experienced with WordPress server administration—can be preferable when a plugin-based transfer is not appropriate.
Step 1: Set up WordPress on the new host
Create the hosting account and prepare the new environment before changing your domain’s DNS.
Depending on the provider, you may either:
- Install a fresh WordPress instance
- Create an empty database and upload your existing installation
- Use the host’s migration service
- Restore a backup created elsewhere
Do not change your domain’s nameservers yet.
The objective is to get the new copy working while visitors are still being served by the old host.
Step 2: Transfer your WordPress files
If you are migrating manually, download the existing WordPress files from the old server using your hosting control panel, SFTP or another supported file-transfer method.
The most important directory is:
wp-content/
It contains your:
- Themes
- Plugins
- Uploaded images
- Other WordPress-generated content
You should normally transfer the entire WordPress installation rather than attempting to reconstruct it from memory.
That includes files such as:
wp-admin/
wp-includes/
wp-content/
wp-config.php
.htaccess
The exact files present can vary depending on your configuration.
Avoid blindly overwriting or modifying files unless you understand what they do. Custom server configuration can be particularly important.
Step 3: Export the WordPress database
The WordPress database contains much of the content that makes the site unique.
If your old host provides phpMyAdmin, you can generally select the WordPress database and export it as an SQL file.
The database name and credentials are normally defined in wp-config.php.
You may see settings resembling:
define( 'DB_NAME', 'database_name' );
define( 'DB_USER', 'database_user' );
define( 'DB_PASSWORD', 'database_password' );
define( 'DB_HOST', 'localhost' );
Do not publish or share the actual credentials.
The database export should be treated as sensitive because it can contain user information and other private website data.
Step 4: Create a database on the new host
The new hosting account needs a database into which you can import the old WordPress database.
Create:
- A new database
- A database user
- A strong password
- Appropriate database permissions
Then import the SQL backup.
The database name and username on the new host do not necessarily need to match those on the old host.
What matters is that the credentials in the new site’s wp-config.php correspond to the new database.
Step 5: Update wp-config.php
If the database name, username, password or host have changed, update the relevant settings in wp-config.php.
For example:
define( 'DB_NAME', 'new_database' );
define( 'DB_USER', 'new_database_user' );
define( 'DB_PASSWORD', 'your_new_password' );
define( 'DB_HOST', 'localhost' );
The exact DB_HOST value depends on your hosting provider. localhost is common, but it should not be assumed.
If these settings are incorrect, WordPress will typically be unable to connect to the database.
Step 6: Test the new site before changing DNS
This is one of the most important steps in the entire migration.
Do not immediately point your domain at the new server and hope everything works.
Instead, find out how your new host allows you to preview the site before DNS changes.
Depending on the provider, this might involve:
- A temporary URL
- A temporary domain
- A staging environment
- Editing your local hosts file
- Another server-preview mechanism
The exact method varies between hosting companies.
During testing, check the parts of the website visitors actually use.
Check the homepage
Confirm that:
- Images load
- CSS works
- Navigation works
- Fonts and scripts load
- The layout is intact
Check several internal pages
Test:
- Posts
- Pages
- Categories
- Search
- Archives
- Contact forms
- Comments, if enabled
Test WordPress administration
Log into /wp-admin/ and verify that:
- You can access the dashboard
- Plugins appear correctly
- Themes are present
- Media files work
- Settings are intact
Test ecommerce functionality
If you operate an online store, go further.
Test:
- Product pages
- Cart
- Checkout
- Customer accounts
- Payment integrations
- Shipping calculations
- Transaction emails
Avoid assuming that a homepage loading successfully means the migration is complete.
Step 7: Check HTTPS and SSL
Your new hosting account needs a valid SSL certificate for the domain.
Once the domain is correctly configured on the new server, verify that:
https://example.com
loads correctly.
Also check whether the site is generating mixed-content warnings.
A site can appear to work while some images, scripts or stylesheets are still being requested over HTTP.
Do not simply replace database URLs with search-and-replace commands without first understanding your WordPress configuration. Serialized data and plugin-specific settings can require migration tools that properly handle URL changes.
Step 8: Check WordPress URLs
WordPress stores its site address in the database.
If the domain itself is not changing, you normally want the WordPress and site URLs to remain unchanged.
If you are also changing domains, the migration becomes more complicated because URLs throughout the database may need to be updated.
For a host-only migration:
oldhost.example
↓
newhost.example
the public website address should remain:
example.com
This is one reason a host migration is generally simpler than simultaneously changing your domain name.
Step 9: Check email before changing DNS
This is an easy detail to overlook.
Your website and email can depend on different DNS records.
For example:
example.com → website
mail.example.com → email service
MX records → mail provider
If your email is hosted separately from your website, do not accidentally replace or delete the MX, TXT, CNAME or other records required by your email provider.
Before changing nameservers, make a record of your existing DNS configuration.
This is particularly important for business domains because an incorrectly configured DNS migration can interrupt email even when the WordPress site itself works perfectly.
Step 10: Change your DNS
Once the new website has been tested, point your domain toward the new hosting provider.
You may do this by changing:
- Nameservers
- An A record
- Other relevant DNS records
The correct method depends on how your domain and DNS are configured.
Changing nameservers transfers DNS management to the new provider, while changing an A record can leave the rest of your DNS configuration with the existing DNS provider.
Do not change DNS records until you know which approach you are using.
What happens after changing DNS?
DNS changes do not necessarily become visible everywhere immediately.
Different DNS resolvers can retain cached records according to the records’ TTL values.
As a result, some visitors may temporarily reach the old server while others reach the new one.
This is another reason not to cancel your old hosting account immediately.
Keep the old site available until DNS propagation has completed and you have confirmed that visitors are consistently reaching the new server.
How long does a WordPress migration take?
The actual transfer can be relatively quick for a small website.
A simple WordPress site might take less than an hour to copy and configure, while a large ecommerce site or complex business installation can require considerably more preparation and testing.
The time-consuming part is often not copying the files.
It is verifying:
- DNS
- SSL
- Database connectivity
- Plugins
- Forms
- Ecommerce
- Cron jobs
- Caching
- Redirects
- External integrations
A careful migration should therefore be planned around testing rather than around the time required to upload the website.
What can go wrong during a WordPress migration?
Several problems appear repeatedly.
Database connection errors
If WordPress displays a database connection error, check:
- Database name
- Username
- Password
- Database host
- User permissions
These values must match the new server’s configuration.
Missing images
If images disappear after migration, check whether the entire wp-content/uploads directory was transferred.
Also check file permissions and whether the database still points to the correct URLs.
Broken links
Broken links can occur if URLs were changed during migration.
A host-only migration should normally leave your public URLs unchanged, which reduces this risk.
Plugins stop working
A plugin may behave differently because the new host uses a different PHP version or server configuration.
Check plugin compatibility before and after migration, particularly for older plugins.
Permalinks produce 404 errors
If the homepage works but individual posts return 404 errors, WordPress’s permalink configuration may need to be refreshed.
In WordPress, visit Settings → Permalinks and save the existing structure again.
This can cause WordPress to regenerate the relevant rewrite configuration.
SSL problems
If HTTPS works on some pages but not others, inspect the site’s resources for HTTP references and verify that the SSL certificate is correctly configured.
Should you migrate WordPress yourself?
For a small, conventional WordPress website, self-migration is usually manageable if you are comfortable with backups, databases and DNS.
Professional assistance becomes more valuable when:
- The site generates significant revenue
- You operate an online store
- The database is very large
- The website receives substantial traffic
- You have custom server configurations
- Email is hosted on the same infrastructure
- The site has complex integrations
- Downtime would have significant consequences
The cost of professional migration can be modest compared with the cost of a prolonged outage or corrupted database.
Can your new host migrate WordPress for you?
Many managed WordPress hosts offer migration tools or migration assistance.
This can be one of the most useful features to compare when choosing a new provider.
For example, SiteGround currently advertises free website migration with its WordPress hosting plans and provides WordPress migration tools.
If you are considering changing providers, it is worth checking the current migration service before doing the transfer manually. SiteGround’s current hosting offers include WordPress hosting options and migration-related features.
The exact scope of migration assistance matters, however. Check whether the service covers your particular website, whether email is included, and whether there are limitations for large or unusual installations.
A safer migration sequence
For most WordPress sites, the following order minimizes unnecessary risk:
- Choose and purchase the new hosting plan.
- Back up the existing WordPress files and database.
- Prepare the new hosting environment.
- Transfer the files and database.
- Configure
wp-config.php. - Test the new site without changing public DNS.
- Verify WordPress, plugins, forms, media and ecommerce functionality.
- Configure SSL and email-related DNS requirements.
- Change the relevant DNS records.
- Monitor the website after DNS propagation.
- Keep the old hosting active until the new site is confirmed stable.
- Only then cancel the old hosting account.
The most important rule: don’t cancel the old host too early
The safest WordPress migration is not necessarily the fastest one.
The old hosting account is effectively your fallback while DNS changes propagate and while you discover problems on the new server. Cancelling it immediately removes that safety net.
Keep the old environment intact until you have verified the new site, confirmed DNS is resolving correctly, checked email and completed any necessary post-migration testing.
Once the new hosting environment has been stable and the old account is no longer receiving meaningful traffic, you can cancel the old service.
That final delay may save considerably more trouble than it costs, and it turns a potentially disruptive WordPress move into a controlled changeover.