{"id":65081,"date":"2022-09-29T13:22:05","date_gmt":"2022-09-29T13:22:05","guid":{"rendered":"\/tutorials\/?p=65081"},"modified":"2026-03-09T19:18:24","modified_gmt":"2026-03-09T19:18:24","slug":"how-to-move-my-wordpress-to-a-new-domain","status":"publish","type":"post","link":"\/ng\/tutorials\/how-to-move-my-wordpress-to-a-new-domain\/","title":{"rendered":"How to move a WordPress site to a new domain"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Moving a WordPress site to a new domain means <strong>changing its primary web address, a common step during rebranding or a strategic shift.<\/strong><\/p><p>Incorrectly moving a website can have serious consequences, such as data loss, broken functionality, and a significant drop in your search engine rankings.<\/p><p>Here&rsquo;s a quick look at how to move your WordPress site to a new domain:<\/p><ol class=\"wp-block-list\">\n<li><strong>Secure your data<\/strong>. Start by creating a complete backup of your website&rsquo;s files and database to prevent any data loss during the transfer.<\/li>\n\n\n\n<li><strong>Copy your database<\/strong>. Export the entire database, which contains all your posts, pages, and user information, preparing it for the new location.<\/li>\n\n\n\n<li><strong>Relocate your files<\/strong>. Upload the backup of your website&rsquo;s core files to the server associated with your new domain name.<\/li>\n\n\n\n<li><strong>Set up the new database<\/strong>. Create a new, empty database on your new hosting account and import the data you exported earlier.<\/li>\n\n\n\n<li><strong>Update database URLs<\/strong>. Change the site URL references within the newly imported database to reflect your new domain name.<\/li>\n\n\n\n<li><strong>Configure WordPress<\/strong>. Edit the wp-config.php file to connect your WordPress installation with the new database.<\/li>\n\n\n\n<li><strong>Repair internal links<\/strong>. After the move, scan your site for any internal links still pointing to the old domain and update them.<\/li>\n\n\n\n<li><strong>Redirect traffic and bots<\/strong>. Implement 301 redirects to automatically send visitors and search engine crawlers from your old domain to the new one.<\/li>\n\n\n\n<li><strong>Inform Google<\/strong>. Use Google Search Console to officially notify the search engine that your site has moved to a new address.<\/li>\n<\/ol><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-1-back-up-your-wordpress-website\">1. Back up your WordPress website<\/h2><p>Before <a href=\"\/ng\/tutorials\/how-to-migrate-wordpress\/\">migrating your WordPress site<\/a>, the first and most critical step is backing up all your site&rsquo;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.<\/p><p>There are several ways to <a href=\"\/ng\/tutorials\/backup-wordpress\/\">back up your WordPress site<\/a>, including using a plugin or the backup tools provided by your hosting provider. The goal is to download a full copy of your site&rsquo;s <strong>public_html<\/strong> directory and a separate file for your database.<\/p><h2 class=\"wp-block-heading\" id=\"h-2-export-the-wordpress-database\">2. Export the WordPress database<\/h2><p>After backing up your files, you need to export the database from your old hosting account. You can typically do this using <strong>phpMyAdmin<\/strong>, a popular database management tool available in most hosting control panels.<\/p><p>The process involves selecting your database in phpMyAdmin, choosing the export function, and saving it as an <strong>SQL<\/strong> file. For a step-by-step guide, see our tutorial on <a href=\"\/ng\/tutorials\/export-mysql-database-with-phpmyadmin\/\">how to export your MySQL database using phpMyAdmin<\/a>.<\/p><h2 class=\"wp-block-heading\" id=\"h-3-upload-your-wordpress-files-to-the-new-domain\">3. Upload your WordPress files to the new domain<\/h2><p>With your website files backed up and saved to your computer, the next step is to upload them to your new hosting account.<\/p><p>This will place your WordPress core files, themes, plugins, and media uploads into the root directory of your new domain, typically the <strong>public_html<\/strong> folder.<\/p><p>You can <a href=\"\/ng\/tutorials\/website\/how-to-upload-your-website\/\">upload your website files<\/a> using your new host&rsquo;s <strong>File Manager<\/strong> or an FTP client like <strong>FileZilla<\/strong>. The transfer might take some time, depending on the size of your website.<\/p><h2 class=\"wp-block-heading\" id=\"h-4-import-the-database-to-the-new-hosting-environment\">4. Import the database to the new hosting environment<\/h2><p>After uploading your files, you need to import your <a href=\"\/ng\/tutorials\/wordpress-database\/\">WordPress database<\/a> into the new hosting environment.<\/p><p>First, create a new, empty MySQL database in your new hosting account&rsquo;s control panel. You&rsquo;ll need to set a database name, a username, and a password &ndash; be sure to save these details for a later step.<\/p><p>Once the new database is ready, use phpMyAdmin in your new hosting account to import the <strong>SQL<\/strong> file you exported earlier. This will populate the new database with all your old site&rsquo;s content.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6a58f068c80a9\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a58f068c80a9\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"901\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Database-Import-feature-in-phpMyAdmin-1.png\/w=1024,h=1024,fit=scale-down\" alt=\"The Database Import tab within the phpMyAdmin interface.\" class=\"wp-image-65088\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Database-Import-feature-in-phpMyAdmin-1.png\/w=1905,fit=scale-down 1905w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Database-Import-feature-in-phpMyAdmin-1.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Database-Import-feature-in-phpMyAdmin-1.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Database-Import-feature-in-phpMyAdmin-1.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Database-Import-feature-in-phpMyAdmin-1.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1905px) 100vw, 1905px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>You can find detailed instructions in our guide on <a href=\"https:\/\/support.hostinger.com\/en\/articles\/1884149-how-to-import-a-database-with-phpmyadmin\">how to import a database with phpMyAdmin<\/a>.<\/p><h2 class=\"wp-block-heading\" id=\"h-5-update-the-website-url-in-the-database\">5. Update the website URL in the database<\/h2><p>Your imported database still contains URLs pointing to your old domain name. You&rsquo;ll need to <a href=\"\/ng\/tutorials\/wordpress\/how-to-change-wordpress-urls-in-mysql-database-using-phpmyadmin\/\">change these WordPress URLs in phpMyAdmin<\/a> to your new domain for WordPress to work correctly.<\/p><p>To do so, simply locate the <strong>wp_options<\/strong> table of your new database, find the <strong>siteurl<\/strong> and <strong>home<\/strong> rows, and replace the old domain with the new one.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6a58f068ca185\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a58f068ca185\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"397\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/Locating-the-siteurl-and-home-options-of-a-WordPress-database-in-phpMyAdmin.png\/w=1024,h=1024,fit=scale-down\" alt=\"The siteurl and home options in a WordPress database via phpMyAdmin.\" class=\"wp-image-65089\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/Locating-the-siteurl-and-home-options-of-a-WordPress-database-in-phpMyAdmin.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/Locating-the-siteurl-and-home-options-of-a-WordPress-database-in-phpMyAdmin.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/Locating-the-siteurl-and-home-options-of-a-WordPress-database-in-phpMyAdmin.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/Locating-the-siteurl-and-home-options-of-a-WordPress-database-in-phpMyAdmin.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h2 class=\"wp-block-heading\" id=\"h-6-update-your-wp-config-php-file\">6. Update your wp-config.php file<\/h2><p>The <a href=\"\/ng\/tutorials\/wp-config-php\/\">wp-config.php<\/a> 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&rsquo;t, your site won&rsquo;t be able to access its content.<\/p><p>Find the <strong>wp-config.php<\/strong> file in the root directory of your new domain and edit the <strong>DB_NAME<\/strong>, <strong>DB_USER<\/strong>, and <strong>DB_PASSWORD<\/strong> values to match the new database credentials you created earlier.<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">define('DB_NAME', 'new database name');\ndefine('DB_USER', 'new database username');\ndefine('DB_PASSWORD', 'new database password');<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6a58f068cbc95\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a58f068cbc95\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1172\" height=\"488\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/wpconfig-databasedetails.png\/w=1024,h=1024,fit=scale-down\" alt=\"Database connection details in the WordPress wp-config.php file.\" class=\"wp-image-80344\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/wpconfig-databasedetails.png\/w=1172,fit=scale-down 1172w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/wpconfig-databasedetails.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/wpconfig-databasedetails.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/wpconfig-databasedetails.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/03\/wpconfig-databasedetails.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1172px) 100vw, 1172px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>This critical step finalizes the connection between your WordPress files and their content.<\/p><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    &#128161; Pro tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\">If you prefer to update the <strong>wp-config.php<\/strong> 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.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-7-fix-broken-links\">7. Fix broken links<\/h2><p>Now that you&rsquo;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&rsquo;s SEO.<\/p><p>It&rsquo;s important to find and update all hardcoded URLs in your posts, pages, and widgets.<\/p><p>While you can <a href=\"\/ng\/tutorials\/find-fix-broken-links-wordpress\/\">fix broken links on your new WordPress site<\/a> manually, it&rsquo;s much more efficient to use a plugin like <strong>Update URLs<\/strong> or <strong>Better Search Replace<\/strong>. These tools scan your entire database and replace all instances of your old domain with the new one.<\/p><h2 class=\"wp-block-heading\" id=\"h-8-set-up-301-redirects-from-your-old-domain\">8. Set up 301 redirects from your old domain<\/h2><p>To preserve your SEO rankings and guide users to your new site, you must <a href=\"\/ng\/tutorials\/301-redirects-in-wordpress\/\">set up 301 redirects<\/a>. This type of redirect permanently forwards traffic from an old URL to a new one, telling search engines that your content has moved.<\/p><p>This passes along the link equity from your old domain to your new one.<\/p><p>It&rsquo;s a crucial step for maintaining your site&rsquo;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&rsquo;s <strong>.htaccess<\/strong> file or using a redirection plugin.<\/p><h2 class=\"wp-block-heading\" id=\"h-9-update-your-google-search-console\">9. Update your Google Search Console<\/h2><p>Finally, you need to <a href=\"\/ng\/tutorials\/submit-website-to-search-engines\/\">inform Google about your domain change<\/a>. This helps Google update its index faster and lets your new domain appear in search results without a long delay.<\/p><p>Before you start, make sure you have verified both your old and new domains in <strong>Google Search Console<\/strong>. Once both domains are verified, navigate to <strong>Settings &rarr; Change of Address<\/strong> to submit your request for the domain change.<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6a58f068cd9bc\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a58f068cd9bc\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1347\" height=\"559\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Change-of-Address-tool-in-Google-Search-Console.png\/w=1024,h=1024,fit=scale-down\" alt=\"The Change of Address tool within the Google Search Console.\" class=\"wp-image-65091\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Change-of-Address-tool-in-Google-Search-Console.png\/w=1347,fit=scale-down 1347w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Change-of-Address-tool-in-Google-Search-Console.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Change-of-Address-tool-in-Google-Search-Console.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Change-of-Address-tool-in-Google-Search-Console.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/09\/The-Change-of-Address-tool-in-Google-Search-Console.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1347px) 100vw, 1347px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    &#129309; Migration assistance                <\/p>\n            <\/div>\n            <p class=\"protip__content\">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 <a href=\"\/ng\/website-migration\">website migration<\/a>.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-move-a-wordpress-site-from-a-subfolder-to-the-root-url\">How to move a WordPress site from a subfolder to the root URL<\/h2><p>Moving a WordPress site from a subfolder to the root URL means <strong>changing its address from a subdirectory, like domain.tld\/wordpress, to the main domain &ndash; domain.tld<\/strong>.<\/p><p>This process is much simpler than a full domain migration because you aren&rsquo;t changing hosting providers or domain names.<\/p><p>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.<\/p><p>Here&rsquo;s what the process looks like compared to migration to a new domain:<\/p><ol class=\"wp-block-list\">\n<li><strong>Relocate your site&rsquo;s files<\/strong>. Instead of uploading files to a new server, you&rsquo;ll move them from the subfolder to your site&rsquo;s root directory (the <strong>public_html<\/strong> folder) on the same server.<\/li>\n\n\n\n<li><strong>Update the site address in WordPress<\/strong>. After moving the files, log in to your WordPress dashboard and navigate to <strong>Settings &rarr; General<\/strong>. Update the <strong>WordPress Address (URL)<\/strong> and <strong>Site Address (URL)<\/strong> fields to reflect the new root URL.<\/li>\n\n\n\n<li><strong>Reset your permalinks<\/strong>. The move can cause your site&rsquo;s links to break. To fix this, go to <strong>Settings &rarr; Permalinks<\/strong> and click <strong>Save Changes<\/strong> without making any edits. This action <a href=\"\/ng\/tutorials\/create-default-wordpress-htaccess-file\/\">regenerates your .htaccess file<\/a> with the correct paths for the new location.<\/li>\n<\/ol><p>Unlike a full domain migration, you don&rsquo;t need to create a new database or edit the <strong>wp-config.php<\/strong> file&rsquo;s credentials.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-maintain-seo-health-after-a-wordpress-migration\">How to maintain SEO health after a WordPress migration<\/h2><p>To maintain SEO health after a WordPress migration, you must <strong>strategically manage the transition to protect your search engine rankings, organic traffic, and domain authority.<\/strong><\/p><p>Your site&rsquo;s SEO stability hinges on how well you implement redirects, update internal links, and prompt search engines to reindex your site.<\/p><p>Here are the most important actions to protect your <a href=\"\/ng\/tutorials\/wordpress-seo-tips\/\">WordPress site&rsquo;s SEO<\/a>:<\/p><ol class=\"wp-block-list\">\n<li><strong>Verify all traffic is rerouted<\/strong>. Use a crawling tool like <strong>Screaming Frog<\/strong> to confirm every old URL has a 301 redirect pointing to the correct new page. Avoid redirect chains or mapping all old pages to the new homepage.<\/li>\n\n\n\n<li><strong>Prompt search engines to crawl the new site<\/strong>. Generate a new XML sitemap that includes all your new URLs. Submit this sitemap to Google Search Console to accelerate the discovery and indexing process.<\/li>\n\n\n\n<li><strong>Watch for technical issues<\/strong>. Monitor your Google Search Console account closely for several weeks. Look for 404 errors, redirect issues, or other crawlability problems and resolve them promptly to prevent negative SEO impacts.<\/li>\n\n\n\n<li><strong>Reclaim high-value backlinks<\/strong>. While you can&rsquo;t change every backlink, identify your most authoritative ones and contact the site owners to ask them to update the link to your new domain. This helps pass link equity directly.<\/li>\n<\/ol><p>By following these steps, you can carry over your hard-earned SEO performance to your new domain.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&rsquo;s a quick look at how to move your [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/how-to-move-my-wordpress-to-a-new-domain\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":115,"featured_media":144320,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to move my WordPress site to a new domain","rank_math_description":"Learn how to move your WordPress site to a new domain with our guide. We'll show you how to transfer files and update your database safely.","rank_math_focus_keyword":"how to move my wordpress to a new domain","footnotes":""},"categories":[22637],"tags":[],"class_list":["post-65081","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-move-my-wordpress-to-a-new-domain","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/migrar-wordpress-a-otro-dominio","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-move-my-wordpress-to-a-new-domain","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-move-my-wordpress-to-a-new-domain-in-9-simple-steps-without-losing-seo","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-move-my-wordpress-to-a-new-domain-in-9-simple-steps-without-losing-seo","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/migrar-wordpress-a-otro-dominio","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/migrar-wordpress-a-otro-dominio","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/migrar-wordpress-a-otro-dominio","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-move-my-wordpress-to-a-new-domain","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-move-my-wordpress-to-a-new-domain","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-move-my-wordpress-to-a-new-domain","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-move-my-wordpress-to-a-new-domain","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/65081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=65081"}],"version-history":[{"count":46,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/65081\/revisions"}],"predecessor-version":[{"id":144319,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/65081\/revisions\/144319"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media\/144320"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=65081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=65081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=65081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}