Posted by jfmoore on August 2, 2011 at 3:54pm
I messed up and posted this on the Drupal forum when I should have posted it here--
Right now, I have a multisite configuration of Drupal 6 installed in:
public_html/drupal
and I would like to move it to:
public_html/drupal/drupal6_root
After I copy the files to the new location, what must be adjusted to reflect the change and recognize the new location?
Thanks.
Comments
It depends on what you
It depends on what you actually want to have. In case you want to have www.example.com as drupal root AND you do have Apache, you need to change Apace DocumentRoot to reflect your new root location. With other web servers you need to change an other directive which points your Drupal root somewhere in filesystem.
In case you wish to have drupal in www.example.com/drupal there's nothing to do with Apache, but you may need to change $base_url-variable in settings.php (probably not necessary, though). If you have links within Drupal content (nodes etc.) you may need to change those as well. For example links within Drupal to '/front' need to be changed to '/drupal/front' etc. It should be possible with MySQL REPLACE- command (_do_ make backup before touching database manually!).
Basically Drupal does not care where it is installed, so you need to tell web server where your webroot exists and take care of possible links within node content.
--
Perttu Ehn
Moving
Moving from:
public_html/drupal
to:
public_html/drupal/drupal6_root
or from:
mysite.com/drupal
to:
mysite.com/drupal/drupal6_root
If you're just moving both
If you're just moving both drupal root and changing url accordingly, then there's not much to do exept move whole Drupal-dir to correct subdir.
So within public_html -dir (if you're on LAMP environment)
mkdir drupal6_rootmv * .* drupal_root
Then you should be able to connect you drupal from http://mysite.com/drupal/
You might want to also redirect your users to new location automatically to new location using ReWrite within Apache configuration, for example appending this to apache2.conf (or httpd.conf, depending on your system).
RedirectMatch ^/$ http://mysite.com/drupal/See also http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
--
Perttu Ehn