Basics - Deployment Configurations

Ways to install Zen Cart

There are different ways to install Zen Cart, depending on your needs. Any of these are legitimate deployments.

Please be sure you’re familiar with basic terms in Zen Cart prior to reading this FAQ.

For instructions on moving your cart from the root to a subfolder (or vice versa), see moving your Zen Cart folder.

For clarity, we will use the folder names store for the cart in a subfolder, and blog for the blog (or other web property) in a subfolder, although of course any other folder names could be used.

1. Cart in root

Cart URL: https://www.YOURSTORE.com 

The configuration that is assumed throughout the Storeowner Docs is that you have installed Zen Cart in the root of your hosting account.

Your files would be under the public_html folder in your hosting account.

2. Cart in root, blog in subfolder

Cart URL: https://www.YOURSTORE.com 
Blog URL: https://www.YOURSTORE.com/blog 

This is very common for people who want the kind of additional content management capabilities offered by a blog (or other tool).

The cart is the same as the prior example.

The blog would be addressed by appending its folder name to the store URL.

This would also apply for a forum in a subfolder, CMS in a subfolder, etc.

Please note: Exercise caution when adding software to your Zen Cart installation. See the blogging FAQ.

3. Existing website in root, cart in subfolder

Website URL: https://www.YOURSTORE.com/
Cart URL: https://www.YOURSTORE.com/store  

If you have an existing website, and you’d like to add ecommerce, you can put your store in a subfolder.

Your files would be under the public_html/store folder in your hosting account.

4. Nothing in root, cart in subfolder

Cart URL: https://www.YOURSTORE.com/store  

Even if you don’t have an existing website in the root folder, you can still place your cart in a subfolder. The URL and file placement are like the previous case. In this case, you’ll want an .htaccess file to redirect anyone who comes to the root folder to the subdomain.

As an example, if your subfolder were called store, you would do this:

RewriteEngine On
RewriteRule ^index\.php$ /store/ [L]

5. Advanced: Separate subdirectories for different versions

Technical staff with advanced server understanding may prefer to use version-numbered directories for their Zen Cart folder, and then redirect the site’s DocumentRoot setting to point to the versioned-subdirectory either by editing a vhost configuration or using a symlink. This can be convenient for staging upgrades that allow for near-zero downtime, and also very convenient downgrading if a problem were to occur. This is a strategy that should only be used by someone with advanced understanding of Zen Cart and how server vhost configurations and symlinks work.




Still have questions? No problem! Just head over to the Zen Cart support forum and ask there in the appropriate subforum. In your post, please include your Zen Cart and PHP versions, and a link to your site.

Is there an error or omission on this page? Please post to General Questions on the support forum. Or, if you'd like to open a pull request, just review the guidelines and get started. You can even PR right here.
Last modified September 7, 2020 by Scott C Wilson (0680304).