I have drupal installed at www.mysite.com/drupal. I want to move it to www.mysite.com. I read some information on earlier versions of drupal http://drupal.org/node/3366
Since Im using version 5, I havent found anything specific for it. What must I do for drupal 5 to make this happen?
Newbie here with first drupal site. Any information will be helpful and thank you.


laura s’s picture

1) move your files system to the webroot.

2) make any adjustments to $base_url in settings.php (if you have set anything there relating to where the home page of your website is)

3) you're done.

You shouldn't have to do anything else, in most cases.

_____ ____ ___ __ _ _
design, snap, blog

_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet

DarrinRich’s picture

Great, thanks. Looking at my settings.php file, It appears the $base_url option has not been used. So it may be that I just move it and Im done. This pretty common not to have to edit anything in the .htaccess or the settings.php file?

DarrinRich’s picture

Moved the site today. No problems at all. Just moved everything and it was set. Had to change a some urls but that was all. Very easy and smooth.

cmrsf1’s picture

I don't know... I'm missing something very basic, here, I'm sure. I have moved all the files in the drupal directory from mysite.com/drupal to mysite.com I am getting the frontpage of the site to show up with all the links showing in the right and left hand columns. I hear what you are saying about editing the settings.php file but I guess I'm not doing in the right spot. Could you take a look at this please and correct me?
* Base URL (optional).
* If you are experiencing issues with different site domains,
* uncomment the Base URL statement below (remove the leading hash sign)
* and fill in the URL to your Drupal installation.
* You might also want to force users to use a given domain.
* See the .htaccess file for more information.
* Examples:
* $base_url = 'http://www.example.com';
* $base_url = 'http://www.example.com:8888';
* $base_url = 'http://www.example.com/drupal';
* $base_url = 'https://www.example.com:8888/drupal';
* It is not allowed to have a trailing slash; Drupal will add it
* for you.
# $base_url = 'http://www.pakpvg.com'; // NO trailing slash!

Above, I have changed http://www.example.com to my actual site, http://www.pakpvg.com I've re-loaded it and it still doesn't work... The tech from my server says that the .htaccess file is set to work as is without any modifications, but he's not really into supporting this, tho he could, but since Drupal isn't supported by the hosting company........

I must just be missing something right in front of my nose! You know how it is. By the time I've gotten to where I have asked this question, I have spent a tremendous amount of time trying to solve this.

Thank you,

VM’s picture

for $base_url to work you have to uncomment it, by taking out the # in front of the line.

cmrsf1’s picture

I thought there must be something like that. I had tried removing the forward slash in the line above. Just learning php so little things like that slip right on by... I also found that there was a problem in the .htaccess file after all. The tech at my server moved it into the right directory and everything fell into place.

This forum is great. Thanks to everyone who participated in this thread and all the threads relating to it!


aserdaten’s picture

I moved from one webhost to another and I'm getting errors that seem to indicate that Drupal is looking to the wrong web root path. (Maintenance page shows with no trouble, but can't load anything else, including the user page) It's not in settings.php, so where is the root path defined? Here's a snippet of error log entries:

[Sat May 19 10:13:03 2007] [error] [client] PHP Fatal error:  Call to undefined function  block_list() in /home/webadmin/mysite.com/html/includes/theme.inc on line 1013
[Sat May 19 10:13:12 2007] [error] [client] PHP Fatal error:  Unsupported operand types in /home/webadmin/mysite.com/html/includes/form.inc on line 342
[Sat May 19 10:16:09 2007] [error] [client] PHP Fatal error:  Unsupported operand types in /home/webadmin/mysite.com/html/includes/form.inc on line 342

The process I employed was to download the entire web root and then upload it to the new host, also to export the database and then import it to the db at the new host.

Vic96’s picture

I've set up my site at www.example.com/directory . Just tried moving it to the root and made base_url changes to the settings file but none of the pages except the home page open up. I'm able to log into the site though as admin. What could be wrong? I'm using Drupal 5. I tried deleting the contents of the cache tables too but it didn't help. Could you guide me, please. Thanks.

Lenwood’s picture

I just moved my Drupal site from one folder to the other. I moved all of the files and edited the base_url setting within settings.php. The main (front) page comes up, but nothing else will open. Does anyone have a suggestion on how to access the rest of the site?


VM’s picture

If the site is in the root folder, try commenting back out the base_url as it more than likely isn't needed now.
Confucius says:
"Those who seek drupal answers should use drupal search!" : )

TonZijlstra’s picture

Do you have clean URL's ON? Then perhaps this is caused by what's in the .htaccess.
I copied a Drupal installation to another dir, and it worked fine with clean URL's OFF. However with clean URL's ON it only opened the front page.
Then I remembered I hadn't copied .htaccess. So I moved that as well (checking that in the new folder there wasn't already a .htaccess with important things in it). Then clean URL's worked fine, and the site was fully functional.

Ton Zijlstra
blog: http://www.zylstra.org/blog

bunset’s picture

I have changed $base_url in drupal 6 and well

WebbyWorker’s picture

I ran into a problem when renaming my drupal directory on a 5.1 site also running civicrm 1.7. It generated this error on all pages:

warning: mkdir() [function.mkdir]: Permission denied in /www/***/public_html/new_directory/sites/all/modules/civicrm/CRM/Utils/File.php on line 114.

Although the actual directories (crm_docs, template_c, and upload) under the files/civicrm directory were set to 777, the civicrm directory itself wasn't. After I changed its permissions to 777, it got rid of the error.

Otherwise, it is pretty easy to just move from one directory to another.

sempotcool’s picture

before moving your files try to disable "Clean url's" otherwise u will access only the frontpage, after moving them drupal will tell you if your host support them or not.