How to Move Website From a Subfolder to the Base Domain via File Manager

How to Move Website From a Subfolder to the Base Domain via File Manager

Hosting users that are just starting out often encounter the so-called “Index of” issue, which manifests when they visit their website via their domain name just after uploading their website. Instead of being greeted with their newly uploaded website, they see a directory listing, which looks similar to this:

Directory listing

In this tutorial, you will learn how to quickly resolve this issue and move your website to the proper directory, which is called public_html, also known as the document root.

What you’ll need

Before you begin this guide you’ll need the following:

  • Access to the cPanel of your hosting account.

Moving your website from a subfolder to your base domain via File Manager

Log in to the cPanel of your hosting account and follow the instructions below:

  1. Click on the File Manager icon, located under the Files category.
    File manager location
  2. Once inside the File Manager, open the public_html directory.
    Public_html directory location
  3. Open the subfolder that you see inside the public_html directory (in our case, it is wordpress) .
    Wordpress folder location
  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. Firstly, select ALL of the files and folders located in your directory by clicking Select All:
    Selecting all files
  5. Now, right-click one of them and select MOVE.
    Moving website files to publichtml
  6. In the next prompt, specify the location where you would like the files to be moved. In our case, this is /public_html
    Specify location where files will be moved
  7. After the files are moved, navigate back to public_html. It is advised to remove the leftover files and folders, which, in our example, are and the wordpress folder (which should now be empty). Select both of these items by using CTRL+Left Click and then click DELETE. This will remove the two unneeded items. You can also remove them one-by-one if you wish.
    Deleting leftover files and folders
  8. At this point, we should check inside public_html directory and see if all of your website’s files are present. In our example, they are all present.
    Final check if files were moved
  9. All that remains is to access your website and check if everything works correctly. Simply type in your domain name in your browser, such as, and check if your website works to your satisfaction. In our example, we see the default WordPress installation page, which means we successfully uploaded our website and now we are able to proceed with installing WordPress.
    Successful WordPress upload now online


We learned how to move your website from a subfolder to the document root (the public_html directory). Simple websites that have just been uploaded can be moved via the method described in this tutorial.

It is useful to note that if you have already installed a software package (for example, WordPress) into a subfolder such as /wp/, it is usually much easier to delete the installation and then re-install it into public_html , rather than moving it by hand, as such operations require users to update configuration files and other settings.

The author

Edgaras G.

Edgaras is a veteran server administrator at Hostinger. He makes sure that every server runs at full throttle and has all the latest technological advancements. When he's not working, Edgaras enjoys skiing and exploring the world.