How to move your Drupal 7 site to a different folder on your domain...
By tonyhughes Hughes, in
Internet, posted: 4-Jan-2013 14:33
So you want to move your Ubuntu 12.04 Drupal 7 installation from foo.com/testing to foo.com/production huh?
So much incomplete information out there, and people scratching their heads. This is how its done:
On Debian Wheezy where Drupal was obtained/installed using wget/dpkg:
1. Go to /var/www and rename the Drupal folder:
mv oldfolder newfolder
2. Go to /usr/share/drupal7/.htaccess and set/change the rewritebase rule to:
RewriteBase /newfolder
All done!
On Ubuntu Server 12.04 LTS where Drupal was installed via apt-get:
1. Open /usr/share/drupal7/sites/default/settings.php and set:
$base_url = "http://www.foo.com/newfolder";
2. Go to /usr/share/drupal7/.htaccess and set/change the rewritebase rule to:
RewriteBase /newfolder
3. Go to etc/apache2/mods-enabled/drupal.conf and empty it (or just change it with lines from step 4 if thats your preference)
4. Uncomment and add the following lines to /etc/apache2/sites-enabled/000-default
#Alias /newfolder /usr/share/drupal7
#
#<Directory /usr/share/drupal7/>
# Options +FollowSymLinks
# AllowOverride All
# order allow,deny
# allow from all
#</Directory>
5. Restart Apache:
sudo service apache2 restart
All done!
http://www.geek101.co.nz/
Other related posts:
HOWTO: Install Ubuntu Server 12.04 LTS and get working mailserver
I want broadband, why do I have to wait 3 days to even know if its POSSIBLE?
Lotteries Commission using open source software
So much incomplete information out there, and people scratching their heads. This is how its done:
On Debian Wheezy where Drupal was obtained/installed using wget/dpkg:
1. Go to /var/www and rename the Drupal folder:
mv oldfolder newfolder
2. Go to /usr/share/drupal7/.htaccess and set/change the rewritebase rule to:
RewriteBase /newfolder
All done!
On Ubuntu Server 12.04 LTS where Drupal was installed via apt-get:
1. Open /usr/share/drupal7/sites/default/settings.php and set:
$base_url = "http://www.foo.com/newfolder";
2. Go to /usr/share/drupal7/.htaccess and set/change the rewritebase rule to:
RewriteBase /newfolder
3. Go to etc/apache2/mods-enabled/drupal.conf and empty it (or just change it with lines from step 4 if thats your preference)
4. Uncomment and add the following lines to /etc/apache2/sites-enabled/000-default
#Alias /newfolder /usr/share/drupal7
#
#<Directory /usr/share/drupal7/>
# Options +FollowSymLinks
# AllowOverride All
# order allow,deny
# allow from all
#</Directory>
5. Restart Apache:
sudo service apache2 restart
All done!
http://www.geek101.co.nz/
Other related posts:
HOWTO: Install Ubuntu Server 12.04 LTS and get working mailserver
I want broadband, why do I have to wait 3 days to even know if its POSSIBLE?
Lotteries Commission using open source software
Permalink to How to move your Drupal 7 site to a different folder on your domain...
| Add a comment
(1 comment)
| Main Index
Add a comment
Please note: comments that are inappropriate or promotional in nature will be deleted.
E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.
Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments.
If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and shown in this blog post.
Author's note by tonyhughes, on 4-Jan-2013 15:16
I highly recommend to install Drupal 7 manually, and not via apt-get...
For all sorts of reasons, including easier staging from dev/test to production, easier backup, and simply a more sane setup.