Edmonds Commerce Logo
  • home
    • blog
  • ecommerce
    • product catalogue
    • order processing
    • customer services
    • stock control
    • human resources
    • management information
  • development
    • oscommerce
    • php
    • mysql
    • open source
    • performance tuning
  • design
  • marketing
  • contact us
    • pricing

Edmonds Commerce Blog

Freelance PHP Ecommerce and SEO Developer in the UK

Latest Posts

Magento Most Popular Extensions
Google Chrome for Linux Beta
Firefox Address Bar Lag + Solution
Custom Buttons for Firefox

Most Popular Posts

Magento Developer UK Freelance osCommerce UK Magento Training CRE Loaded UK

Migrating osCommerce Sites to a New Server (also CRE Loaded, Zen Cart etc)

October 22nd, 2009
Read More oscommerce

If you need to move your osCommerce (and derivatives such as CRE Loaded and Zen Cart) based site to a new server, here is a quick explanation of our approach which enables you to handle the migration without any downtime and no loss of order or customer information despite the fact that in the propagation period, visitors may visit the new server or the old server.

This propagation period is due to the fact that DNS servers around the globe may have cached your old DNS record, which points your domain name at your old IP address. These caches can stay alive for up to 48 hours meaning that you can not be certain that a visitor will definitely go to your new server within this period despite the fact that you have updated your domain name to point at your new name servers.

First - Copy the Files + Database:

Of course you need to copy all of the site files from the old server to the new server. The slowest and least reliable way to do this is via FTP. By using FTP, you have to actually download all the files on your old server to your local PC and then upload those files from your local PC to the new server. This can take a long time, especially the uploading part (thanks to the asynchronous nature of ADSL).

For the database you need to create a dump file via the command line or exporting from phpMyAdmin. Like FTP for the files, if you use phpMyAdmin then you have to download the dump file to your local machine and then upload it to the new server.

A better method for moving the files and database dump is to use SCP to copy files directly from the old server to the new server. I have written an article explaining this technique here: Basic Server Migration Using SSH + SCP.

Configuring the New Server
Unfortunately osCommerce based sites often require register globals to be enabled. They also use the old fashioned long arrays. That means that you will probably need to edit the configuration of the new server to enable these old PHP features.

This is an example vhost.conf (don't forget to create the vhost_ssl.conf with the same settings) for Plesk.

PLAIN TEXT
CODE:
  1. <Directory /var/www/vhosts/********.co.uk/httpdocs>
  2. php_admin_value open_basedir /var/www/vhosts/******.co.uk/dbCreds:/var/www/vhosts/******.co.uk/httpdocs:/tmp
  3. AllowOverride All
  4. php_admin_flag register_globals on
  5. php_admin_flag register_long_arrays on
  6. </Directory>

Note that I have specified a non webaccessible folder called dbCreds which contains the database credentials. I can then simply include this file from within the includes/configure.php and admin/includes/configure.php files.

Ensuring No Loss of Customer or Order Information
To make sure that you don't lose any customer or order information, we need to take a couple of extra steps. First though an explanation of what can go wrong:

During the propagation period, there is a distinct possibility that you will be taking orders on both servers. If you don't take any extra steps, then you might have orders and customers on both servers that have the same id number on the database. This can then make transferring the missing orders from the old server to the new server problematic.

A simple solution is to simply edit the autoincrement value on the orders and the customers table. I would normally suggest using a big jump in increment like 1000. This will mean that new orders and customers created on the new server will have id numbers that are 1000 higher than the old server. By doing this, we can then import any missing order and customer information over, safe in the knowledge that the id numbers will not clash. Of course, if you expect to create 1000 orders or customers within a couple of days then you will need to make a bigger increment increase on the new server. You are probably also turning over vast amounts of cash :)

Once the propagation period is over, lets say 3 days after you update your name servers, you can use this little script I created to help you to export the missing orders from your old server to your new server

Server Migration Orders / Customers Synchronisation

Get Someone To Handle it For You
Of course, if you prefer you can book someone to handle the migration for you. If you would like us to take care of your migration, just get in touch.

Possibly Relevant Posts:

  • Freelance osCommerce UK
  • CRE Loaded PCI Compliance Validated
  • osCommerce Checkout Problems + Solution
  • osCommerce Payment Module Configuration Not Saving + Solution
  • Accessing Raw XML Posted to a Script

Feed | Respond | Trackback

Leave a Reply

  • RSS Feed
  • Categories

    • adwords
    • apache
    • barcode
    • business
    • creloaded
    • css
    • curl
    • customer services
    • debugging
    • drupal
    • eclipse
    • ecommerce
    • edmondscommerce
    • email
    • excel
    • firefox
    • flash
    • gd
    • git
    • graphs
    • hosting
    • icecat
    • internet news
    • javascript
    • jquery
    • link building
    • linux
    • mac
    • magento
    • management
    • misc
    • mod_rewrite
    • mysql
    • netbeans
    • open suse
    • oscommerce
    • php
    • plesk
    • portfolio
    • product catalogue
    • product feed
    • programming
    • regular expressions
    • ria
    • scraping
    • search engine optimisation
    • security
    • seo
    • spidering
    • symfony
    • twitter
    • ubuntu
    • Uncategorized
    • usability
    • vps
    • web design
    • web development
    • Windows
    • xampp
    • zend framework
    • zip
  • Archives

    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
  • Tags

    bulk course cre loaded creloaded css custom developer development directories drupal error find firefox git google hosts file html jaunty javascript leeds links linux magento mysql netbeans oscommerce performance php plesk ppc problem replace search engine optimisation seo server symfony table training ubuntu uk virtualbox web web design xml zend framework
  • Random Posts

    • Jquery 1.4 Released
    • Magento Custom Model via Mage::getSingleton()
    • Updated MySQL Dump Splitter and Cleaner
    • Setting up a 64bit Linux PHP Development Enviroment
    • MySQL Find and Replace
    • Using cURL with XAMPP
    • Eclipse Navigation Shortcuts
    • Healthy Lunch Delivered Direct to your Desk - The Lunchbox Has Landed!
    • Be Broadband Counter Strike Connection Problems + Solution
    • osCommerce Version 3 System Requirements
  • Recent Comments

    • admin on Magento Backup Error Filesystem.php on line 234 + Solution
    • admin on Magento Leeds
    • Matthew Dolley on Magento Leeds
    • kash on PHP Email Attachment Function
    • Hussein on PHP Save Images Using cURL
  • Category Specific RSS

    • adwords Feed for all posts filed under adwords
    • apache Feed for all posts filed under apache
    • barcode Feed for all posts filed under barcode
    • business Feed for all posts filed under business
    • creloaded Feed for all posts filed under creloaded
    • css Feed for all posts filed under css
    • curl Feed for all posts filed under curl
    • customer services Feed for all posts filed under customer services
    • debugging Feed for all posts filed under debugging
    • drupal Feed for all posts filed under drupal
    • eclipse Feed for all posts filed under eclipse
    • ecommerce Feed for all posts filed under ecommerce
    • edmondscommerce Feed for all posts filed under edmondscommerce
    • email Feed for all posts filed under email
    • excel Feed for all posts filed under excel
    • firefox Feed for all posts filed under firefox
    • flash Feed for all posts filed under flash
    • gd Feed for all posts filed under gd
    • git Feed for all posts filed under git
    • graphs Feed for all posts filed under graphs
    • hosting Feed for all posts filed under hosting
    • icecat Feed for all posts filed under icecat
    • internet news Feed for all posts filed under internet news
    • javascript Feed for all posts filed under javascript
    • jquery Feed for all posts filed under jquery
    • link building Feed for all posts filed under link building
    • linux Feed for all posts filed under linux
    • mac Feed for all posts filed under mac
    • magento Feed for all posts filed under magento
    • management Feed for all posts filed under management
    • misc Feed for all posts filed under misc
    • mod_rewrite Feed for all posts filed under mod_rewrite
    • mysql Feed for all posts filed under mysql
    • netbeans Feed for all posts filed under netbeans
    • open suse Feed for all posts filed under open suse
    • oscommerce Feed for all posts filed under oscommerce
    • php Feed for all posts filed under php
    • plesk Feed for all posts filed under plesk
    • portfolio Feed for all posts filed under portfolio
    • product catalogue Feed for all posts filed under product catalogue
    • product feed Feed for all posts filed under product feed
    • programming Feed for all posts filed under programming
    • regular expressions Feed for all posts filed under regular expressions
    • ria Feed for all posts filed under ria
    • scraping Feed for all posts filed under scraping
    • search engine optimisation Feed for all posts filed under search engine optimisation
    • security Feed for all posts filed under security
    • seo Feed for all posts filed under seo
    • spidering Feed for all posts filed under spidering
    • symfony Feed for all posts filed under symfony
    • twitter Feed for all posts filed under twitter
    • ubuntu Feed for all posts filed under ubuntu
    • Uncategorized Feed for all posts filed under Uncategorized
    • usability Feed for all posts filed under usability
    • vps Feed for all posts filed under vps
    • web design Feed for all posts filed under web design
    • web development Feed for all posts filed under web development
    • Windows Feed for all posts filed under Windows
    • xampp Feed for all posts filed under xampp
    • zend framework Feed for all posts filed under zend framework
    • zip Feed for all posts filed under zip

Edmonds Commerce related questions? Send us a message or call us on 0844 357 0201.

Freelance PHP Web Design UK Commercial Web Design