How to move a website from a subfolder to the base domain on cPanel

Fix the Index of page on cPanel at Hostinger by moving your website files from a subfolder into the public_html folder with File Manager.

Updated 3 weeks ago

Move a website from a subfolder to the base domain on cPanel at Hostinger when your domain shows an Index of page instead of your uploaded website. Move the website’s files from the subfolder into public_html with cPanel File Manager. An Index of page looks similar to this:

cPanel directory listing showing the wordpress folder and wordpress-4.5.3.zip file

Move your website to the base domain

You can quickly resolve it by moving your website to the proper directory, which is called public_html, also known as the document root by following these steps:

  1. Open your cPanel → File Manager:

  2. Once inside the File Manager, open the public_html directory:

    cPanel File Manager showing public_html selected in the folder tree and file list
  3. Open the subfolder that you see inside the public_html directory (in our case, it is wordpress):

    cPanel File Manager showing the wordpress folder in public_html highlighted
  4. You should see all of your website’s files. You will know if you are in the right place if you see a file named index.php or index.html. Select all the files and folders by clicking Select All:

    File manager with Select All checkbox highlighted above WordPress folders
  5. Right-click one of them and select Move:

    cPanel File Manager context menu with Move highlighted for index.php file
  6. 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 Move Files:

    cPanel file manager move dialog with /public_html path highlighted and Move Files button
  7. After the files are moved, navigate back to /public_html and remove any leftover files and folders, (in our example, wordpress-5.8.1.zip, and the wordpress folder).

  8. Finally, access your website in your browser after clearing the cache and check that everything works correctly.

Your website now loads from the base domain. To upload a website directly to public_html next time, see How to upload a backup with File Manager in cPanel.

NOTES

  • 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 re-install it into the public_html folder

  • If you’re moving your entire website to a different type of hosting rather than just a different folder, see how to migrate from cPanel to Web or Cloud hosting at Hostinger instead.