How to move website from subdirectory to the root folder

When you still have your website on main domain or just do not want to put a new website there until it is finished, it is really a great idea to install it firstly to a subfolder.

zemez wordpress themes

However, if you already adjusted your website and now it is completely ready to go public, – my congratulations! Let’s learn how to overcome this obstacle.

  1. Let’s start with moving all the files from the sub-directory (i.e., public_html/joomla) to the root (i.e., public_html). You can use FTP manager or cPanel to do the trick.

  2. Now, when files are already in the right place, you just need to adjust configuration.php file. Open it and locate the following lines of code:

    Just remove the name of subfolder (on our case it is joomla) from it, so in the end you will get the following code:

  3. Also, do not forget to check your .htaccess because the subfolder should be removed there as well.

  4. Finally, login to your admin panel (use already your new url  http://www.example.com/administrator ), navigate to System -> Clear Cache and delete all the cached files.

Well done! Let your visitors enjoy your website!

 

monster one