Moving Drupal from one directory to the root
SektorZ - April 29, 2009 - 13:36
My Drupal website is on
mywebsite.net/drupal
I need to move it to
mywebsite.net/
Can you please give me some tips on how to set up Drupal after moving it and how should I do the moving in the first place?

Also if there is a possible
Also if there is a possible way to not move everything (because that's alot of data) but just change the settings of the moved Drupal?...
I'd be interested in the
I'd be interested in the answer to this question as well...
Eric
__________
Eric Aitala - f1m@f1m.com
The Formula 1 Modeling Website
www.f1m.com
Webserver
Perhaps, you can change the Doc Root of your webserver from "www" to "www/drupal" instead of considering to move the directory.
Many web hosting companies
Many web hosting companies wont let you do this, so....
Eric
__________
Eric Aitala - f1m@f1m.com
The Formula 1 Modeling Website
www.f1m.com
Normally there are no
Normally there are no settings needing changing. You just move the whole structure back. Although you may encounter a few problems, especially if you are using clean URLs.
You may need to check:
- Your .htaccess file, if you have added anything mentioning the subdirectory.
- Your sites/default/settings.php file, if you have manually set the $base_url to point to the subdirectory (normally you wouldn't have).
Some modules may have registered their location somehow. If you get any error messages, usually you can browse to the admin/build/modules page, let the page load, and the paths will be detected and fixed. Also clear the cache in admin/settings/performance.
Clean URLs and subdirectories can be a headache when trying to move a site. If you are using clean URLs, you may encounter problems with broken file or image links inside the content. If this happens, you can either edit those posts and use absolute root relative URL paths such as
<img src="/sites/default/files/filename">or try the http://drupal.org/project/pathologic module.Don't leave old copies lying around under drupal's directory.
Also, if you have set up a cron job fix its path.
------- Edited to add:
For a solution without actually moving the files see http://drupal.org/node/144643 but I wouldn't advise it. Complicated .htaccess rewrites can make it real hard to troubleshoot problems. Keep things simple.
I first tried the solution
I first tried the solution without having to move all the data but it ended up screwing up my website totally, so I guess I'll have to move everything after all. Thank you for the tips, I don't use Clean URL's, so that's one plus...