{"id":971,"date":"2022-03-02T12:45:43","date_gmt":"2022-03-02T12:45:43","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2022\/03\/02\/6022371-how-to-move-a-website-from-a-subfolder-to-the-base-domain-on-cpanel\/"},"modified":"2025-08-27T07:03:23","modified_gmt":"2025-08-27T07:03:23","slug":"6022371-how-to-move-a-website-from-a-subfolder-to-the-base-domain-on-cpanel","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/6022371-how-to-move-a-website-from-a-subfolder-to-the-base-domain-on-cpanel\/","title":{"rendered":"How to Move a Website From a Subfolder to the Base Domain on cPanel"},"content":{"rendered":"<p class=\"no-margin\">If you <b><a href=\"\/support\/4548506-how-to-upload-backup-with-file-manager-in-cpanel\" target=\"_blank\" class=\"intercom-content-link\">uploaded your website<\/a><\/b> and after doing so you encounter the so-called <b>Index of<\/b> issue, where your website looks similar to this instead of the uploaded content:<\/p><p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/9dfd6098-0a07-442c-8862-160a6f8518d8.jpg\"><\/div><p class=\"no-margin\">You can quickly resolve it by moving your website to the proper directory, which is called <b>public_html<\/b>, also known as the <b>document root<\/b> by following these steps:<\/p><ol>\n<li>\n<p class=\"no-margin\">Open your cPanel &rarr; <b>File Manager<\/b>:<\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/2d51fee0-1dcf-4b43-bd4b-a7e837e06b1b.jpg\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Once inside the File Manager, open the <code>public_html<\/code> directory:<\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/46ac5d25-b40c-4b9f-a73b-1ad63df6f86b.jpg\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Open the subfolder that you see inside the public_html directory (in our case, it is <b>wordpress<\/b>):<\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/a8f60d0d-94a0-43c1-8d6a-ac2e59dbbd80.jpg\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">You should see all of your website&rsquo;s files. You will know if you are in the right place if you see a file named <b>index.php<\/b> or <b>index.html<\/b>. Select all the files and folders by clicking Select All:<\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/2f477e08-ef92-432a-9664-dde11f17ebd0.jpg\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Right-click one of them and select <b>Move:<\/b><\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/1c3ae99a-d2eb-4853-8981-eabf1270dda2.jpg\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">Next, specify the location where you would like the files to be moved. For the main domain of your account, this is \/public_html, and click on <b>Move Files<\/b>:<\/p>\n<p class=\"no-margin\">\n<\/p><div class=\"intercom-container intercom-align-center\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2022\/03\/3feae671-9c33-4b61-99ae-9f76a764b0c5.jpg\"><\/div>\n<\/li>\n<li>\n<p class=\"no-margin\">After the files are moved, navigate back to \/public_html and remove any leftover files and folders, (in our example, <b>wordpress-5.8.1.zip,<\/b> and the <b>wordpress<\/b> folder).<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\">Finally, access your website in your browser after <b><a href=\"\/support\/1583501-how-to-clear-cache\" target=\"_blank\" class=\"intercom-content-link\">clearing the cache<\/a><\/b> and check that everything works correctly.<\/p>\n<\/li>\n<\/ol><p class=\"no-margin\">That&rsquo;s it! You have successfully moved your website from a subfolder to the base domain &#128522;<\/p><p class=\"no-margin\">\n<\/p><p class=\"no-margin\"><b>NOTES:<\/b><\/p><ul>\n<li>\n<p class=\"no-margin\">If you have already installed a software package (for example, WordPress) into a subfolder, it is usually much easier to delete the installation and then <b><a href=\"\/support\/4469641-can-i-install-applications-automatically-with-cpanel\" target=\"_blank\" class=\"intercom-content-link\">re-install it<\/a><\/b> into the public_html folder<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b><a href=\"\/support\/4548506-how-to-upload-backup-with-file-manager-in-cpanel\" target=\"_blank\" class=\"intercom-content-link\">How to upload a backup with File Manager in cPanel?<\/a><\/b><\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Moving website from a subfolder to the main domain on Hostinger using cPanel<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[196],"tags":[],"class_list":["post-971","post","type-post","status-publish","format-standard","hentry","category-ftp-file-manager"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/6022371-how-to-move-a-website-from-a-subfolder-to-the-base-domain-on-cpanel\/","default":1},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/support\/6022371-como-mover-un-sitio-web-de-una-subcarpeta-al-dominio-base-en-hostinger\/","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/support\/6022371-comment-transferer-un-site-web-d-un-sous-dossier-vers-le-domaine-de-base-sur-cpanel\/","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/support\/6022371-bagaimana-cara-memindahkan-website-dari-subfolder-ke-domain-utama-di-cpanel\/","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/br\/support\/6022371-como-mover-um-site-de-uma-subpasta-para-um-dominio-no-cpanel-hostinger\/","default":0},{"locale":"uk-UA","link":"https:\/\/www.hostinger.com\/ua\/support\/6022371-------\/","default":0}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/971","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=971"}],"version-history":[{"count":1,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/971\/revisions"}],"predecessor-version":[{"id":3940,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/971\/revisions\/3940"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=971"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=971"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=971"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}