X-Cart Mods, X-Cart Addons - WebsiteCM
Did you know...
We offer a Community Forum to learn, build, and share with other users of x-cart software?
X-Cart Excellence eZine
Subscribe for proven tips and special discounts!
Cart is empty
View X-Cart Mods
Filter MODS BY VERSION
XCart Mods (4.1.x)
XCart Mods (4.0.x)
XCart Mods (3.5.x)
XCart Mods (3.4.x)
View All
Mods By Purpose
Mods By Firm

Move X-Cart to Root


By default x-cart installs to an xcart folder, which is great advertising for x-cart, but not so great for you; for security and to keep information from competitors, you do not want to advertise your software. This tutorial will assist you in moving your store out of the xcart folder, and moving it to root (alternatively you could change the instructions accordingly to change to a different subfolder).

Follow the instructions for your specific x-cart version:

X-Cart 4.1.x

  • Begin by backing up your files and your database
  • Be sure that no files in your root directory have names similar to those in your x-cart directory, and then move all of your x-cart files to the root directory.
  • Open up your config.php and find: $xcart_web_dir ="/xcart";
  • Change it to: $xcart_web_dir ="";
  • Reupload your config.php
  • To preserve your old links and search engine positions, you will want to redirect your old links to your new links, you can do this with the following code in an .htaccess file (if your server supports it).  Be sure to substitute your domain name:

    RewriteEngine On
    RewriteRule ^xcart/(.*)$ http://www.yourdomain.com/$1 [R=301,L]

Other X-Cart Versions

  • Begin by backing up your files and your database
  • If you have images in a file system (instead of the database) use your admin section to move images back to the database in "Images Location"
  • Be sure that no files in your root directory have names similar to those in your x-cart directory, and then move all of your x-cart files to the root directory.
  • Open up your config.php and find: $xcart_web_dir ="/xcart";
  • Change it to: $xcart_web_dir ="";
  • Reupload your config.php
  • If you had previously stored images in a file system (instead of the database) use your admin section to move images back to the file system in "Images Location"
  • To preserve your old links and search engine positions, you will want to redirect your old links to your new links, you can do this with the following code in an .htaccess file (if your server supports it).  Be sure to substitute your domain name:

    RewriteEngine On 
    RewriteRule ^xcart/(.*)$ http://www.yourdomain.com/$1 [R=301,L]
Authored by Jon Peters, founder of WebsiteCM, specializing in providing X-Cart mods, X-Cart addons and x-cart development services since 2002.

Article copyright 2007 WebsiteCM.com and may be republished provided all content is left intact including author information, copyright notice and website links.
 Previous: Moving X-Cart Database

Comments on: Move X-Cart to Root [Share Your Comments]


Will On a new installation I ftp'd the extracted files of that xcart directory into the root directory of the site, intalled and it works well.

Administrators Note: Initial x-cart install to root is ideal. This tutorial is for those who did not originally do so.


Share Your Comments:


Your Name:
Comments:

Type the characters you see in the picture. (If you do not see any picture here, please enable images in your web browser options and refresh this page):

Get a different code
digg
technorati
Delicious
Reddit
Google Bookmarks
Furl it!

Live Help

Site Map