Dec 02, 2025
Jordana A. & Ariffud M.
6min Read
Moving a WordPress site to a new domain means changing its primary web address, a common step during rebranding or a strategic shift.
Incorrectly moving a website can have serious consequences, such as data loss, broken functionality, and a significant drop in your search engine rankings.
Here’s a quick look at how to move your WordPress site to a new domain:
Before migrating your WordPress site, the first and most critical step is backing up all your site’s files and its database. This gives you a complete, working version of your site that you can restore if anything goes wrong during the migration, preventing any data loss.
There are several ways to back up your WordPress site, including using a plugin or the backup tools provided by your hosting provider. The goal is to download a full copy of your site’s public_html directory and a separate file for your database.
After backing up your files, you need to export the database from your old hosting account. You can typically do this using phpMyAdmin, a popular database management tool available in most hosting control panels.
The process involves selecting your database in phpMyAdmin, choosing the export function, and saving it as an SQL file. For a step-by-step guide, see our tutorial on how to export your MySQL database using phpMyAdmin.
With your website files backed up and saved to your computer, the next step is to upload them to your new hosting account.
This will place your WordPress core files, themes, plugins, and media uploads into the root directory of your new domain, typically the public_html folder.
You can upload your website files using your new host’s File Manager or an FTP client like FileZilla. The transfer might take some time, depending on the size of your website.
After uploading your files, you need to import your WordPress database into the new hosting environment.
First, create a new, empty MySQL database in your new hosting account’s control panel. You’ll need to set a database name, a username, and a password – be sure to save these details for a later step.
Once the new database is ready, use phpMyAdmin in your new hosting account to import the SQL file you exported earlier. This will populate the new database with all your old site’s content.

You can find detailed instructions in our guide on how to import a database with phpMyAdmin.
Your imported database still contains URLs pointing to your old domain name. You’ll need to change these WordPress URLs in phpMyAdmin to your new domain for WordPress to work correctly.
To do so, simply locate the wp_options table of your new database, find the siteurl and home rows, and replace the old domain with the new one.

The wp-config.php file contains the database connection details for your WordPress site. You must update this file to connect WordPress to your new database. If you don’t, your site won’t be able to access its content.
Find the wp-config.php file in the root directory of your new domain and edit the DB_NAME, DB_USER, and DB_PASSWORD values to match the new database credentials you created earlier.
define('DB_NAME', 'new database name');
define('DB_USER', 'new database username');
define('DB_PASSWORD', 'new database password');
This critical step finalizes the connection between your WordPress files and their content.
If you prefer to update the wp-config.php file using a text editor instead of File Manager, download it via an FTP client and re-upload it to the root folder once you update it.
Now that you’ve migrated your site, you may find that some internal links still point to your old domain, leading to 404 errors. These broken links can harm user experience and your site’s SEO.
It’s important to find and update all hardcoded URLs in your posts, pages, and widgets.
While you can fix broken links on your new WordPress site manually, it’s much more efficient to use a plugin like Update URLs or Better Search Replace. These tools scan your entire database and replace all instances of your old domain with the new one.
To preserve your SEO rankings and guide users to your new site, you must set up 301 redirects. This type of redirect permanently forwards traffic from an old URL to a new one, telling search engines that your content has moved.
This passes along the link equity from your old domain to your new one.
It’s a crucial step for maintaining your site’s authority and helping visitors who use old links or bookmarks land on the correct page. You can set these up by editing your site’s .htaccess file or using a redirection plugin.
Finally, you need to inform Google about your domain change. This helps Google update its index faster and lets your new domain appear in search results without a long delay.
Before you start, make sure you have verified both your old and new domains in Google Search Console. Once both domains are verified, navigate to Settings → Change of Address to submit your request for the domain change.

If you wish to switch to Hostinger but prefer not to do it manually, we have a migration team that can assist you. You only need to send us a request for website migration.
Moving a WordPress site from a subfolder to the root URL means changing its address from a subdirectory, like domain.tld/wordpress, to the main domain – domain.tld.
This process is much simpler than a full domain migration because you aren’t changing hosting providers or domain names.
The main difference is that you are only repositioning the files on the server and updating WordPress settings, not migrating the database to a new location.
Here’s what the process looks like compared to migration to a new domain:
Unlike a full domain migration, you don’t need to create a new database or edit the wp-config.php file’s credentials.
To maintain SEO health after a WordPress migration, you must strategically manage the transition to protect your search engine rankings, organic traffic, and domain authority.
Your site’s SEO stability hinges on how well you implement redirects, update internal links, and prompt search engines to reindex your site.
Here are the most important actions to protect your WordPress site’s SEO:
By following these steps, you can carry over your hard-earned SEO performance to your new domain.