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 your root folder (public_html).

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 subdirectory to your root (public_html) folder. The best and easiest way to do this is using an FTP client.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset my Drupal admin password?

Here's how you would change the admin password for your current Drupal installation: 1. Login to...

I am receiving 404 error message after I have enabled my Drupal clean/SEF/Short URLs

This issue usually happens after enabling the "Clean URLs" option in Drupal.In order to resolve...

What is the path to the Drupal user/admin login page?

If the login module is disabled on your Drupal front page, it is useful to know the path to the...

How to reset my Drupal admin password?

Here's how you would change the admin password for your current Drupal installation: 1. Login to...

I am receiving 404 error message after I have enabled my Drupal clean/SEF/Short URLs

This issue usually happens after enabling the "Clean URLs" option in Drupal.In order to resolve...