Knowledge Base Article

How can I transfer my Drupal site from a sub-directory to my root folder?

This can be done in several easy steps.

1. Change the base dir in your settings.php to point to the your subdirectory.

You can edit the file from your cPanel -> File Manager in the following way:

- Navigate to your /sites/default directory.
- Click on the letters next to the icon of settings.php
- A little box should appear on the top-right side of the page.
- Click on Edit File Contents and you should be able to edit the file.

2. Change the RewriteBase dir in your .htaccess file to be /

The contents of your .htaccess file should contain a line like the one below:

RewriteBase /


You can edit this file in the same way as you did with your settings.php file.

3. After that you should move all the Drupal files which are under your sub-directory to your root(public_html) folder. The best and easiest way to do this is using a FTP client software.



Rating

Please indicate if this article was helpful for you.

rating :  3.1 from 5
views :  1132
votes :  7

Valid XHTML 1.0 Strict Valid CSS!