Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Moving Drupal site to new domain
Old 05-13-2010, 01:35 AM Moving Drupal site to new domain
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
I just did this and thought I should write it up for posterity.
The plan is to move a Drupal site from a development server
account and development URL to the live production account and new URL.

Moving a Drupal site is even easier that moving WordPress.

First caveat: the original domain and new domain are both
hosted by the same hosting company. Moving to a different hosting company may require additional steps.

Second caveat: both sites were set up using the Simple Scripts "one-click-install" system.

1. Back up the /sites/all/modules directory at www.olddomain.com (I used a simple Filezilla FTP program. There might be faster methods of doing this.

2. Back up the /sites/all/themes directory at www.olddomain.com (see above).

3. Go to your new hosting account and use the "Simple Scripts" one-click-install to create a default Drupal site. You should have a bare bones Garland themed site that works. Disable Clean URLs if it's currently enabled.

4. Upload the directory you made at point one to /sites/all/modules under www.newdomain.com (don't make any changes to the enabled modules screen)

5. Upload the directory you made at point two to /sites/all/themes under www.newdomain.com (don't make any changes to the enabled themes).

6. Go to you www.olddomain.com site and disable Clean URLs (not completely sure if this is necessary, but this is what i did and it works for me)

7. Go into www.olddomain.com Drupal site and click through to Administer/Site Configuration/Performance. Clear cached data.

8. Go to phpMyAdmin and find the database for www.olddomain.com (to state the bleeding obvious, make sure its the right db!). Select all the tables.

9. Click on the Export Tab. Most of the defaults should be Ok. But make sure you have the following checked "Structure" and "Data". You will probably need to also check "add DROP TABLE /VIEW/PROCEDURE/FUNCTION/EVENT". This just drops any tables that conflict in the existing database of www.newdomain.com

10. Click "Go". You should be asked to download an sql file.

11. Use phpMyAdmin Import tab to import your new sql file to www.newdomain.com. You should get a "success" message in green.

12. You should be able to log into www.newdomain.com (using the admin name and password from www.olddomain.com) and re-enable clean URLs.

13. Go to refridgerator and search for cold beer. Sit back and relax.


Note:
If you get an error message something like this:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home6/southdes/public_html/modules/user/user.admin.inc on line 884

the simplest fix is to go to your Drupal settings file in /sites/default/settings.php
You might need to change the file attributes and change it to 666, writeable.

In the settings.php find the section on php settings and add this line to the end
ini_set('memory_limit', '64M');

overwrite the existing settings.php file and refresh your Drupal page and you should be good to go.

Footnote:
Also don't forget your /sites/default/uploads/ folder if you have any images that need migrating.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE

Last edited by TWD; 05-17-2010 at 05:27 AM..
TWD is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-14-2010, 10:13 PM Re: Moving Drupal site to new domain
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
Further note to self:

If the site in question uses multi-language site variables (slogan etc.) be
sure to post this block of code into the bottom of the "settings.php" file.

Code:
/**
* Multilingual settings
*
* This is a collection of variables that can be set up for each language when i18n is enabled.
* These are the basic ones for Drupal core, but you can add your own here.
*/
$conf['i18n_variables'] = array(
  // Site name, slogan, mission, etc..
//  'site_name',
  'site_slogan',
//  'site_mission',
//  'site_footer',
//  'anonymous',
  // Different front page for each language
 // 'site_frontpage',
  // Primary and secondary links
//  'menu_primary_links_source',
//  'menu_secondary_links_source',
  // Contact form information
//  'contact_form_information',
);
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is offline
Reply With Quote
View Public Profile
 
Old 08-23-2010, 11:33 PM Re: Moving Drupal site to new domain
TWD
TWD's Avatar
King Spam Talker

Posts: 1,190
Trades: 0
Further footnote.

In step 3 above, make sure the Drupal core version you are creating is the same as the site you are moving.

Version differences could cause unpredicatable problems or simply not work.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Moving Drupal site to new domain
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22754 seconds with 12 queries