X-Cart:Moving store to web-root directory

From X-Cart 4 Classic
Revision as of 09:46, 29 October 2010 by Ivka (talk | contribs)
Jump to: navigation, search

Here are general instructions on how to move your cart to the web-root directory:

1. Make sure your product and category images are stored in the database. If they are stored on the filesystem, you should temporarily move them to the database. You can do this under the "Images location" section of the admin interface.

2. Move all files from the directory where X-Cart installed to the root web directory. You can do this using either FTP or (better) SSH access. File permissions must be preserved during the copying, otherwise you will need to adjust the permissions manually.

3. Edit config.php file adjusting $xcart_web_dir parameter. If your cart was installed in the "store" directory, you should replace the following string:

$xcart_web_dir ="/store";

with this:

$xcart_web_dir ="";

4. If you have enabled clean urls in your .htaccess file

# Clean URLs [[[
Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /xcart/
RewriteCond %{REQUEST_URI} !^/xcart/(payment|admin|provider|partner)/
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ dispatcher.php [L]
</IfModule>
# /Clean URLs ]]]

you have to go in and change those as well

# Clean URLs [[[
Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(payment|admin|provider|partner)/
RewriteCond %{REQUEST_FILENAME} !\.(gif|jpe?g|png|js|css|swf|php|ico)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ dispatcher.php [L]
</IfModule>
# /Clean URLs ]]]

5. Check if X-Cart is working fine on the new location.

6. Move products and category images back to the filesystem if necessary.