Server Admin - Switch Servers

From Zen Cart(tm) Wiki
Revision as of 06:21, 12 August 2006 by DrByte (talk | contribs) (note to use same table-prefix name)
Jump to: navigation, search


I want to move my Zen Cart™ installation to another host or a different server

  1. On your 'new' host, create a new MySQL database. Note the username, password, database name, and host name (usually localhost).
  2. Go to your 'new' host and upload (FTP) a fresh new install using the same version files that you built your other site on...this will make sure that you get the proper settings in your configure.php files...
    While installing, USE THE SAME DB_PREFIX (table prefix, ie: zen_ or blank, etc) AS THE OLD SITE, and allow it to install the demo products, so that you can test and be sure that it's working nicely.
    • Install.
    • Test it.
    • Make backups of the 'new' server's /includes/configure.php and /admin/includes/configure.php files by downloading them (FTP) to your PC.
  3. Make a complete backup of your database and store.
    • Use phpMyAdmin to export your entire database...include the "DROP" tables command, and under Data, choose "Complete Inserts" and "Extended Inserts".
      Save the SQL file to your PC for later.
    • Download all your old site's files via FTP (or if you have the option, zip them up on the server and download the zip)
  4. Now upload your 'old' files over the 'new' files on the 'new' server, with two exceptions: Don't overwrite the /includes/configure.php and /admin/includes/configure.php files on the 'new' server.
  5. Go back to phpMyAdmin on your 'new' server.
    • Select your 'new' database (that you installed the 'new' Zen Cart™ into)
    • DROP all the tables. (Check them all and scroll down and on "With Selected..." select DROP.
      Confirm Yes.
    • Click on the SQL tab across the top (or "Import" on newer phpMyAdmin configurations) and click Browse.
    • Select the SQL file you made in step 3a when you exported your old database, and click Go.
  6. Grab the "Fix_Cache_Key" utility to reset your Admin > Sessions > Session Directory key: Fix Cache Key Utility
    Simply upload the file to your 'new' Zen Cart™ folder and open fix_cache_key.php in your browser. It will give you status messages. Delete fix_cache_key.php when you're finished.
  7. You're done. Open your store and admin areas to see it all ready to go!