SEO · WordPress · Website Migration

WordPress Migration:
Moving from Hosting A to Hosting B

Moving WordPress to a new hosting provider does not have to be complicated, but it does require a precise process. The key is not to underestimate the file backup, database export, configuration changes, URLs, DNS and final testing.

8
main migration steps
2
backup parts: files and database
48 h
possible DNS propagation
4
areas to check before launch
Before you start

First compare the technical hosting parameters

Before starting the migration, check whether the new hosting environment matches the requirements of the original website. Configuration differences can cause issues, especially with older WordPress websites that are not ready for the default setup of the new hosting provider.

Risk

An older website may not fit the new environment

Issues may appear because of a different PHP version, lower PHP memory limit, different PHP configuration or differences in how the server handles .htaccess or NGINX rules.

Checklist

What to verify in advance

Check the PHP version, PHP memory limit, MySQL availability and version, .htaccess support or the NGINX equivalent, and values such as max_execution_time.

Backup and preparation

Migration starts with a complete backup

WordPress is not transferred as files alone. You need to download the files via FTP or SFTP and export the MySQL database as well. Without either of these parts, the website will not be complete after the move.

01

Back up WordPress files

Connect to the original hosting via FTP or SFTP. You can use tools such as Total Commander or FileZilla. Download the full WordPress root directory, typically public_html, www, the domain folder or a similar directory.

02

Back up the MySQL database

Log in to phpMyAdmin on the original hosting, select the WordPress database and run an export. For a standard migration, the original article recommends the Quick method and SQL format.

03

Prepare the new hosting

Create a MySQL database on the new hosting, add a database user and grant that user the required permissions. Also prepare the FTP space and save the FTP and database access details.

Transfer to Hosting B

Upload files, import the database and update wp-config.php

After preparing the new hosting, upload the downloaded WordPress files to the domain’s root directory. Then import the SQL database file in phpMyAdmin on the new hosting.

Once the files are uploaded, open wp-config.php and enter the new database details. Typically, you will update DB_NAME, DB_USER, DB_PASSWORD and DB_HOST.

DB_NAME = new database name DB_USER = database username DB_PASSWORD = database password DB_HOST = MySQL server hostname, often localhost, but it depends on the hosting provider
URL and domain

If the domain changes, update URLs in the database

If the domain name or website path changes, you need to update URLs in the database. URLs may appear not only in page content, but also in media, documents and other stored data.

Option 1

SQL queries in phpMyAdmin

You can update URLs using SQL queries on the new database. Always replace the old domain with the new one and check the table prefix, for example wp_.

Option 2

Better Search Replace plugin

If you are not comfortable with SQL queries, you can use the Better Search Replace plugin, which allows you to update URLs in bulk directly from the WordPress admin.

UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com', 'http://www.new-domain.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://www.old-domain.com', 'http://www.new-domain.com');
Testing and DNS

Before going live, perform a website check

After importing the files, database and configuration changes, test the website carefully. Only then does it make sense to update the domain’s DNS records to point to the new hosting.

Testing

What to check after migration

Check pages and posts, links, forms, login, images, videos and other media. Also verify loading speed with tools such as Google PageSpeed Insights or GTmetrix.

DNS

Watch out for DNS propagation

After changing A records or NS records, DNS propagation can take from several hours up to 48 hours. During this time, the website may point to either the old or the new hosting.

Key takeaways

What to watch out for during a WordPress migration

Back up both parts of the website

Files alone are not enough. WordPress needs both files and the database, otherwise the website will not run correctly after the move.

Check the configuration

Differences in PHP, MySQL, memory limits or server rules can cause problems, especially on older WordPress websites.

Do not skip testing

After migration, verify content, forms, media, plugins, theme behavior and loading speed. Change DNS only after testing.

FAQ · Common questions

WordPress migration: frequently asked questions

What should you check before migrating WordPress?

Before migrating WordPress, compare the technical parameters of the old and new hosting environments, especially the PHP version, PHP memory limit, MySQL availability and version, .htaccess support or the NGINX equivalent, and PHP settings such as max_execution_time.

Do I need to back up both WordPress files and the database?

Yes. WordPress consists of files stored via FTP or SFTP and a MySQL database. For a safe migration, you need to download the complete WordPress file structure and export the database, usually through phpMyAdmin in SQL format.

When do I need to update URLs in the database?

You need to update URLs in the database if the domain name or website path changes. URLs may be stored not only in page content, but also in media, documents and other saved data. You can update them using SQL queries or the Better Search Replace plugin.

How long can DNS propagation take after changing hosting?

After changing DNS records, propagation can take anywhere from a few hours up to 48 hours. During this period, the website may temporarily point to either the old or the new hosting environment.

Need to migrate WordPress safely?

If you need help migrating WordPress, we can review the hosting setup, database, files, DNS and the technical transition from an SEO perspective.

Get a free consultation

Free, no-obligation consultation

After you complete the form, we will contact you to arrange a free, no-obligation consultation together. During the consultation, we will discuss your needs and the possibilities for further cooperation. The consultation is completely free and does not commit you to anything.

Quick website analysis

The analysis is prepared manually by our experts within a few business days. You will receive it in PDF format. The analysis is completely free and without obligation. More information can be found here.
Get website analysis