I have installed Zen Cart to a directory. How do I rename or move that directory?

Scenario: I have been building my ZC behind the scenes at: http://www.mysite1.com/shop/
I am nearly ready to go live with it at: http://www.mysite1.com/

Will there be any problems with my ZC if I just move the entire thing to my main directory?
Is there anything I need to change in my database or config files?

Moving your site to another folder on your server

  1. Determine the new foldername where your Zen Cart® files will be running from
  2. Go into Admin > Configuration > Sessions and change the Session Directory to reflect the new folder name. If you cannot do this, see the alternate approach in step 5 below.
  3. Move/Rename the folder. You may need to use your FTP program to do this.
  4. Your /includes/configure.php and /admin/includes/configure.php files are used to point Zen Cart® to the right folders. In that file, you need to update several entries to match the new path information:
    • DIR_WS_CATALOG
    • DIR_WS_HTTPS_CATALOG
    • DIR_FS_CATALOG
    • DIR_FS_LOGS (since v1.5.0)
    • DIR_FS_SQL_CACHE 

      And in older versions (ie: v1.3.9h and older) you'll need to also adjust these in your /admin/includes/configure.php file. They don't need adjusting in v1.5.0 or newer:
    • DIR_WS_ADMIN
    • DIR_WS_HTTPS_ADMIN (in admin)
    • DIR_FS_ADMIN (in admin)

    Note that the configure.php files are normally "read-only". You'll need to change their permissions to "writable" before you can upload your changes. Be sure to note level the permissions were at before changing, so that you can put them back to the read-only permissions again after updating.
  5. If you could not set the Session Write Directory in step 1 above, you can use a utility to do it for you. The goal is to make sure that the new path information (specifically the DIR_FS_SQL_CACHE setting in your new configure.php file) matches theSession Write Directory setting. If it doesn't, you may end up with difficulties logging in to the Admin area or maintaining login sessions in the store. The Fix Cache Key Utility from the Plugins > Troubleshooting Tools area on the main Zen Cart® site will help you to do this if you need assistance. There is no harm running it to have it check that things are set properly. Be sure to delete the file from your server when done.


Other Articles of Interest:
How do I set file permissions?
What do the permissions numbers / CHMOD mean?
Making configure.php file read-only


NOTE: It's NOT recommended to use any upper-case letters in your folder/directory names. Stick to lower-case if possible.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...