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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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_.
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.
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.
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.
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.
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.
What is typically used during a migration
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