Moving Oscommerce To your Root

Posted by Lindsayanng on February 15th, 2009

Moving oscommerce to root
If you don’t already know this, your “root” is they public_html directory, or the main page of your site. This is the directory that users will land on if they type in your domain. If you have a web page in there called index, then they will automatically see that, otherwise they will not see anything. It is the very TOP directory for your website pages.

When you install oscommerce using a “Simple Scripts” install, you will be asked to name the folder in which you want your store to be. The default is usually called “catalog” This is ok if your website is more than just a store, but if you are just a store, you should really move the entire oscommerce install into your root directory. If you want to learn more about why, click here.

So let’s get started

First you need to make sure that you have an FTP program installed. For a mac I prefer FETCH and for pc i like cuteFtp, however FILEZILLA is free.

When you connect to your server, you will be able to see your “catalog” folder. You need to open that folder, and highlight all of the contents and move them to your root (or public_html folder). This will take some time because there are hundreds of files in that folder, and your FTP program can only move them so fast.

Once that is done, you will need to go to the following file:
catalog/includes/configure.php
**** Please see the below note

Open this file in a text editor (dreamweaver, textedit, notepad etc)

Configure.php is where you tell your website which folders and files to look for certain pages.
You will want to pay close attention to these lines of code: (line 6-10)

define(‘HTTP_COOKIE_PATH’, ‘/catalog/’);
define(‘HTTPS_COOKIE_PATH’, ‘/catalog/’);
define(‘DIR_WS_HTTP_CATALOG’, ‘/catalog/’);
define(‘DIR_WS_HTTPS_CATALOG’, ‘/catalog/’);

You will want to change everywhere you see ‘/catalog/’ to simply ‘/’

You then want to go to catalog/admin/includes/configure.php and do exactly the same.

Confused as to why you have two configure.php files?? Click here to read about the oscommerce file structure.

If you complete this and you get some type of error page that has your host’s name on it, that means that your host created an index.html page for you. You will want to go to your root folder and search for index.html and delete it. Your new home page will be called index.php

**** if you installed oscommerce and followed the instructions and removed the error that said “configure.php is writable” then you will not be able to change anything in your configure.php file. Read here on how to change the permission for that file.

VN:F [1.9.7_1111]
Rating: +3 (from 3 votes)

Want to know who is offering this awesome content? Here it is! Someone who is relatively new to web design. I am new enough to still remember how absolutely frustrating it was to try and get anything done in this field, but have also been around long enough to be able to help those that are where I was a year ago. Aside from web design, I run the office of my dad's engineering business, and do book keeping by trade. I love my pets.. All 6 cats, 1 peg legged dogs, and 1 hedgehog. LOVE THEM!! Oh yea, and my husband. He lets me chase my dreams and I let him do the same. We are happy people because of it. Read more from this author


2 Responses to “Moving Oscommerce To your Root”

  1. VA:F [1.9.7_1111]
    Rating: 0.0/5 (0 votes cast)

    what about just put a copy of index.php on root directory?

    VA:F [1.9.7_1111]
    Rating: 0 (from 0 votes)
  2. VN:F [1.9.7_1111]
    Rating: 0.0/5 (0 votes cast)

    I do believe you can do that, but you will have to get into the oscommerce configure file to let it know that you are serving the index from the root but the rest are in a sub directory.

    I can probably work it out and post another tutorial

    VN:F [1.9.7_1111]
    Rating: 0 (from 0 votes)

Leave a Reply

Improve the web with Nofollow Reciprocity.