Web Hosting Line
1.800.828.9231
osCommerce Hosting
osCommerce Tutorial
osCommerce Templates
osCommerce Modules
osCommerce FAQ
About osCommerce
Template Monster and SiteGround
Template Monster, the largest provider of premium osCommerce templates, now partners with SiteGround.
Host Package
Free Domain name
750 GB space
7500 GB Traffic/mo
Ecommerce pack
99.9% Server Uptime
24/7 Top Customer Care
Immediate activation
The Best Host Package
learn more sign up now
Try Doba drop shipping services:
Award for best osCommerce host:
Add Voice to Your Site:
Display entire tutorial on one page. Print-friendly version.

osCommerce Upgrade

Make sure you backup up your files and database before proceeding with the upgrade

Upgrading OsCommerce is fairly easy. First of, you will need to install the new version manually to your account in a separate subdirectory, e.g. /new-version.

This installation will be temporary and will be needed only during the upgrade process.

Once the new osCommerce version is installed, you need to import the old database over the new database. You can find out how to export and import a MySQL database here.

When you download the new version package of the OsCommerce application, you will see a folder called "Extras" there. In this folder a subfolder named pr21_to_pr22 is placed, which contains the upgrade file named ms1_to_ms2.php.

The name of the file may vary depending on the current osCommerce version. In the newer versions of osCommerce the upgrade file may be missing, because the database does not need to be upgraded; only the files do.

Rename the upgrade file to upgrade.php and upload it in the root directory of your store. If your osCommerce application is installed directly under your public_html directory, you should upload the file there. If the application is installed in a subdirectory, upload the file in this directory. Once uploaded, load this file in your web browser, then fill in the MySQL details for the new database - the one used for the manual installation of the osCommerce application.

Click on [Submit] and the progress of the upgrade process will be displayed on the page.

Once the upgrade.php file has upgraded your database, your new osCommerce application will be ready for testing. Navigate through the newly installed application and make sure that it is working properly. Once you have tested it, it is time to copy the new version files from the temporary directory to the new one.

First, you will need to back up the files of the existing installation by downloading them with your FTP client.

Once the files are backed up, use your FTP client to copy the new version files from the temporary directory to the one in which your osCommerce application was prior to the upgrade.

Once the copying is complete, you will need to edit the two configuration files in order to reflect the directory change. These files are named configure.php and are located in: /includes/configure.php and /admin/includes/configure.php.

Navigate to the /includes/configure.php file via the cPanel File manager and locate the following line:

define('HTTP_SERVER', 'http://yourdomainname.com/new-version' );

Where new-version is the name of the temporary directory, which you have chosen for the manual installation.

Then replace it with the correct URL to your store. If it is located directly in your public_html directory, simply remove the /new-version part and leave the line like this:

define('HTTP_SERVER', 'http://yourdomainname.com' );

Now navigate to the /admin/includes/configure.php file, where you will need to edit a few lines.

The first one is again for the HTTP_SERVER setting and should be edited as shown above.

Then locate the line:

define('HTTP_CATALOG_SERVER', 'http://yourdomainname.com/new-version');

and again remove the /new-version part from the URL.

The next few lines which need to be edited are:

define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html/new-version'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/new-version/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/user/public_html/new-version/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/new-version/'); // absolute path required
define('DIR_FS_CATALOG', '/home/user/public_html/new-version/'); // absolute path required

These lines contain the absolute server path to your store's catalog and admin directories. If your application is installed in the public_html directory, simply remove the /new-version located at the end of each path and save the file. It should look like this:

define('DIR_FS_DOCUMENT_ROOT', '/home/user/public_html'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/home/user/public_html/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/'); // absolute path required
define('DIR_FS_CATALOG', '/home/user/public_html/'); // absolute path required

If your application is installed under a subdirectory, simply replace the /new-version directory with the name of the folder in which osCommerce is located.

The upgrade may cause some of your contributions/modules to stop working. You should reinstall them so that they can function properly with the new osCommerce version

Well done! You have upgraded your osCommerce installation!

Please, feel free to contact us if you have any questions or recommendations about this tutorial at: tutorials 'at' siteground.com



Oscommerce Hosting
(c) Copyright 2005 SiteGround Business Web Hosting Services. All rights reserved.
Previous Next