{"id":646,"date":"2023-07-24T05:45:56","date_gmt":"2023-07-24T05:45:56","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/07\/24\/8165530-how-to-move-a-wordpress-website-from-a-subdomain-to-the-root-domain-in-hostinger\/"},"modified":"2026-09-15T10:20:39","modified_gmt":"2026-09-15T10:20:39","slug":"8165530-how-to-move-a-wordpress-website-from-a-subdomain-to-the-root-domain-in-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/8165530-how-to-move-a-wordpress-website-from-a-subdomain-to-the-root-domain-in-hostinger\/","title":{"rendered":"How to move a WordPress website from a subdomain to the root domain in Hostinger"},"content":{"rendered":"

If you wish to move your website from a subdomain to the root domain<\/b> (subdomain.domain.tld<\/code> → domain.tld<\/code>), follow the steps below.<\/p>

\n

First, make sure the root domain<\/b> is added to your hosting plan<\/a><\/b> – it should be visible in the Websites<\/a> <\/b>section of Hostinger dashboard.<\/p>\n<\/div>

Step 1 – Copy files from the subdomain to the root domain<\/h2>
    \n
  1. In the Websites<\/a><\/b> section, click on Dashboard <\/b>next to your website that’s connected to the subdomain.<\/li>\n
  2. In the left sidebar, search for File Manager<\/b> and access all the files within your hosting plan<\/b>:<\/li>\n
  3. Open the domains <\/b>folder, then open the folder of your website<\/b> (e.g., subdomain.domain.tld<\/code>), <\/b>and then open the public_html<\/b> folder within:
    \n\"Hostinger<\/li>\n
  4. Select all the files, and copy them to the root domain<\/b> (make sure its folder is empty):
    \n\"Hostinger<\/li>\n<\/ol>

    To choose the correct destination folder (e.g., domain.tld<\/code>), click on the .. icon<\/b> to go to the parent folder as many times as you need. Learn more: Basic Actions in the File Manager<\/a><\/b><\/p>

    Step 2 – Connect the database<\/h2>

    There are two options to choose from:<\/p>

    Option 1<\/h4>

    If you wish for the subdomain to remain active<\/b>, duplicate the database and connect the new database to your website:<\/p>

      \n
    1. \n

      Download a backup<\/a><\/b> of your original website’s database<\/b><\/p>\n<\/li>\n

    2. \n

      Create a new database<\/a><\/b> for your new website (that’s on the root domain)<\/p>\n<\/li>\n

    3. \n

      Import the database backup to the new website<\/p>\n<\/li>\n

    4. \n

      Update the database details<\/a><\/b> (name, username, password) in the wp-config.php<\/b> file<\/p>\n<\/li>\n<\/ol>

      Option 2<\/h4>

      If you don’t want to keep the subdomain active<\/b>, you can leave the previous database connected.<\/p>

      Step 3 – Fix URLs<\/h2>

      Finally, update your website’s URLs by replacing the subdomain with the root domain<\/b>. There are a couple of ways to do that:<\/p>