Very often we have customers asking how to move a site installed in a subdirectory into the main web root. This could be the case if you are working on a new version of your site in a subdirectory like test or beta and once done you want to replace the main site with this. In terms of URLs, lets assume for this example that you have a site at http://yourdomain.com and a new version at http://yourdomain.com/tester, and now we want to move the tester directory so that it replaces the site at http://yourdomain.com.
-
Login to your hosting control panel and click on the "File Manager" icon.
-
Right click on the
testerdirectory and selectMove file.
-
In the dialog box type in
../. This basically means: "move the directory to its parent folder".
-
Now if you browse your account's home dir you will see the
testerdir next to thepublic_htmlfolder.
-
Rename the
public_htmlfolder topublic_html_old.

-
Rename the
testerfolder topublic_html. (Same process as above). -
Update filesystem paths in
configuration.php. You will find this file inpublic_html. In this file locate the lines where thelog_pathandtmp_pathare set. In this case we simply need to remove the "tester" bit from the path and save the file.
Change from:
var $log_path = '/home/sites/yourdomain.com/public_html/tester/logs'; var $tmp_path = '/home/sites/yourdomain.com/public_html/tester/tmp';
To:
var $log_path = '/home/sites/yourdomain.com/public_html/logs'; var $tmp_path = '/home/sites/yourdomain.com/public_html/tmp';