We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsJoomlaJoomla Transfer

How to Move Joomla to Root Folder

If you have Joomla installed in a sub-folder in public_html directory and you need to move it to the root directory, this can be accomplished by simply moving all files from the sub-folder directly to public_html. Therefore, Joomla website will be accessible from www.domain.com instead of www.domain.com/joomla.

Follow These Steps to Move Joomla to Your Root Folder

Before doing any changes on your website, you should make sure you have a recent backup of your website and database. Backups can be easily created using a server control panel which most hosting service providers supply after ordering hosting service.

Start with connecting to a place where your website is currently hosted. It can be your hosting providers control panel or an FTP client.

Navigate to the sub-folder where you can see the Joomla files and copy all of them. Then go back to public_html of your domain name and paste all the files. It’s advised to have public_html directory empty or with only the default files or remove previously uploaded website files. This way you will ensure there won’t be any conflict with the files and you will know you have only Joomla files there.

Once we are done with copy-paste of the files, we need to accomplish one last, but important thing. As Joomla has configuration file in which it has some important definitions like website URL, path to the logs and tmp directories and ftp root, we will need to adjust them accordingly.

Open file “configuration.php” for editing and locate the following lines:

var $live_site = 'http://www.domain.com/joomla';
var $log_path = '/home/username/public_html/joomla/logs';
var $tmp_path = '/home/username/public_html/joomla/tmp';
var $ftp_root = 'public_html/joomla';

Replace each of the line according to our new Joomla location.

var $live_site = 'http://www.domain.com/';
var $log_path = '/home/username/public_html/logs';
var $tmp_path = '/home/username/public_html/tmp';
var $ftp_root = 'public_html/';

    Then save the file and close it. Finally check how website is looking through web browser by opening http://www.domain.com/. We should see exactly the same website as it was working at http://www.domain.com/joomla. In the case you will notice any error or even blank pages, try to check in apache error logs or contact with hosting provider support center. If there is no way to trace the issue, we can always restore website from the backup we have made before moving website to the root directory.

Rate this Tutorial:
One CommentLeave a Comment
  1. Luis Casanova

    Excellent tutorial! I was able to fix the problem in a few minutes following your simple instructions! Way to go! Thanks!


    Other (197)

    Popular Keywords