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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

I get an error when I try to install modules in my Drupal.

If you receive an error message like the one provided below while trying to install a module to...

How to fix the Drupal cron when halted?

If your Drupal cron fails to run then most probably the process is stuck and needs to be fixed...

How to disable comments in Drupal

Very often Drupal (especially outdated versions) has problems with Spam bots which flood its...

What is streaming/broadcasting?

Streaming is a term often used to define the display of video and audio media in real time....

How to display FeedBurner feeds on your website?

FeedBurner provides you with a lot of useful statistics about the usage of your feeds. Using...