How to change OpenCart script folder?

If you want to move your existing OpenCart installation to another folder, you should edit the OpenCartInstallationFolder/ and the OpenCartInstallationFolder/admin/ folders.

The following lines of the OpenCartInstallationFolder/configure.php file should be modified:

// HTTP

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

define('HTTP_IMAGE', 'http://yourdomain.com/newfolder/image/');

define('HTTP_ADMIN', 'http://yourdomain.com/newfolder/admin/');

// HTTPS

define('HTTPS_SERVER', 'http://yourdomain.com/newfolder/');

define('HTTPS_IMAGE', 'http://yourdomain.com/newfolder/image/');

// DIR

define('DIR_APPLICATION', '/home/yourusername/public_html/newfolder/catalog/');

define('DIR_SYSTEM', '/home/yourusername/public_html/newfolder/system/');

define('DIR_DATABASE', '/home/yourusername/public_html/newfolder/system/database/');

define('DIR_LANGUAGE', '/home/yourusername/public_html/newfolder/catalog/language/');

define('DIR_TEMPLATE', '/home/yourusername/public_html/newfolder/catalog/view/theme/');

define('DIR_CONFIG', '/home/yourusername/public_html/newfolder/system/config/');

define('DIR_IMAGE', '/home/yourusername/public_html/newfolder/image/');

define('DIR_CACHE', '/home/yourusername/public_html/newfolder/system/cache/');

define('DIR_DOWNLOAD', '/home/yourusername/public_html/newfolder/download/');

define('DIR_LOGS', '/home/yourusername/public_html/newfolder/system/logs/');

In the above lines change the yourdomain.com, yourusername and newfolder strings with your account's domain, cPanel username and the new directory where your OpenCart installation is located.

Perform the same modifications in the OpenCartInstallationFolder/admin/configure.php file.

You need help with a shopping cart? hostlantern is specialized in eCommerce hosting and provides expert support for a large number of shopping carts. Check out our shopping cart hosting services!

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to fix the problem with uploaded images not showing in Prestashop?

The most common reason for this problem is that the pictures are being uploaded with incorrect...

How to set OpenCart to use SMTP

By default, the PHP mail() function is used for sending emails from the OpenCart application. To...

How to clear the cache in Prestashop

When making changes in Prestashop they will often not appear right away due to old cached...

How to configure Prestashop to work with another domain

Prestashop, like many other applications out there, works based on a domain name. In case you...

How to enable SEO/SEF links in Opencart?

You can enable the SEO/SEF feature in Opencart through the admin area > System > Settings...