For example, if you have installed Opencart at https://www.opencartstore.com/store and if you would like to transfer it to another directory let's say https://www.opencartstore.com/store1
For this, you would like to modify the following 2 files:
http://www.opencartstore.com/shop/configure.php
and
http://www.opencartstore.com/shop/admin/configure.php
Now you need to find the following lines in these 2 files:
// HTTP
define('HTTP_SERVER', 'http://opencartstore.com/newfolder');
define('HTTP_IMAGE', 'http://opencartstore.com/newfolder/image/');
define('HTTP_ADMIN', 'http://opencartstore.com/newfolder/admin/');
// HTTPS
define('HTTPS_SERVER', 'http://opencartstore.com/newfolder/');
define('HTTPS_IMAGE', 'http://opencartstore.com/newfolder/image/');
// DIR
define('DIR_APPLICATION', '/home/username/public_html/newfolder/catalog/');
define('DIR_SYSTEM', '/home/username/public_html/newfolder/system/');
define('DIR_DATABASE', '/home/username/public_html/newfolder/system/database/');
define('DIR_LANGUAGE', '/home/username/public_html/newfolder/catalog/language/');
define('DIR_TEMPLATE', '/home/username/public_html/newfolder/catalog/view/theme/');
define('DIR_CONFIG', '/home/username/public_html/newfolder/system/config/');
define('DIR_IMAGE', '/home/username/public_html/newfolder/image/');
define('DIR_CACHE', '/home/username/public_html/newfolder/system/cache/');
define('DIR_DOWNLOAD', '/home/username/public_html/newfolder/download/');
define('DIR_LOGS', '/home/username/public_html/newfolder/system/logs/');
Note: You have to replace opencartstore.com with your domain name.