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.

eCommerce Tycoon


You are currently viewing our eCommerce Tycoon as a guest. Please register to participate.
Login



Reply
Moving an ecommerce site to new domain
Old 07-22-2010, 10:12 PM Moving an ecommerce site to new domain
TWD
TWD's Avatar
King Spam Talker

Posts: 1,183
Trades: 0
Here is how I moved our Magento site (without needing SSH access).

To do this, it helps a lot if your hosting CPanel has Simple Scripts one click Magento installer.

1. Make a full backup of the files on www.oldsite.com
CPanel should have a Backup Wizard tool that will zip all the files in
your home directory. Download the zipped file to your desktop.

2. Make a backup of the Magento SQL file. I used the inbuilt Backup tool but you could also use the CPanel Backup Wizard or directly export the database from myPHPAdmin. [There is a "gotcha" that we will cover in a minute]

3. Use your Simple Scripts installer to create www.newsite.com

4. Using your FTP client, go to www.newsite.com and download the local.xml file located in app/etc/local.xml
We will need this later.

5. Now this is the stage that will take a while. Unzip the backup made in step 1 above onto your desktop. Now upload the following directories, overwriting what is already in www.newsite.com
/app
/lib
/media
/skin
Put the tea on because there are MANY files.

6. Now look in the local.xml file you downloaded in step 4. You will see unencripted database connection details. DB name, DB user, DB password.
Write these down.

7. Download the local.xml file from www.newsite.com (it is part of what you just migrated from www.oldsite.com) and change the DB name, DB user, DB password to what you recorded in point 6. Save it back to your server.

8. Find the SQL file you backed up in point 2. This is the "gotcha" moment mentioned above. Magento uses something called MSQL foreign key checking. All you need to know is that your import will probably fail UNLESS these lines are present at the very beginning of your SQL file.

Code:
SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
SET NAMES utf8;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';
SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;
and these lines at the bottom of your file

Code:
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
SET SQL_NOTES=@OLD_SQL_NOTES;
They might in fact already be there but are commented out. In that case just enable them by removing the commenting characters.
[You can read more about foreign key checking here http://www.magentocommerce.com/wiki/...ento_database]

9. Import the SQL file into your database at www.newsite.com using myPHPadmin. All the default settings should be fine. You should see a successful import message. It could take a minute or two.

10. While still in myPHPadmin, find the table core_config_data.
If there are any URL references in this table to www.oldsite.com, you must edit them to www.newsite.com

11. You need to re-enable any Magento extensions so go to www.oldsite.com and copy the folder /downloader/pearlib/download
into www.newsite.com
You will also need to update your extension registry
/downloader/pearlib/php/.registry/.channel.connect.magentocommerce.com_community
and
/downloader/pearlib/php/.registry/.channel.connect.magentocommerce.com_core

[found this info in a thread http://forum.siteground.com/showthread.php?t=11182 God bless you MDBattery!]

Copy the contents of these folders from www.oldsite.com to www.newsite.com

12. Log in the Admin panel of www.newsite.com. Flush the cache, flush the storage, flush the catalog images and flush the JS&CSS.

13. You should now be good to go!
Log into Magento Connect and make sure all your previously installed extensions are there. Make sure that everything else on the backend is working properly. Go to the front end and you should see an exact duplicate of www.oldsite.com , now running on www.newsite.com.

Place a few test orders to make sure everything is running smoothly.

It's not a simple process like moving Drupal or even WordPress. A lot of steps. You know, a lotta ins, lotta outs, lotta what-have-yous.

Hope this helps somebody.
__________________
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; 07-22-2010 at 10:19 PM..
TWD is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Moving an ecommerce 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.18036 seconds with 12 queries