220.127.116.11. Moving the storage directory outside of the OpenCart root directory
Warning!Site backup functionality does not cover directories that are moved outside the site's root directory. Such directories will only be available in backup hostingaccount.
In OpenCart, to make the site files more secure, the directory
storage can be taken out of bounds site root directory... This is to ensure that the directory cannot be accessed via HTTP.
This transfer can be done in two ways:
Automatic movement is available under the following conditions:
storageis in root directory of the site.
- OpenCart version 18.104.22.168 or higher is used.
- No changes were made to OpenCart settings.
- Directory movement functionality
storageprovided by the CMS... In this regard, there may be additional conditions for its correct operation.
For automatic catalog transfer
storage do the following:
- Go to section "Dasboard" in the left pane:
- If all the conditions are met, a modal window will appear with a proposal to move the catalog
storageoutside the site directory. To move the directory press "Move":
storageoutside the root directory of the site, do the following:
- Edit config files OpenCart or use universal config filesby changing the line:
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
To the next one:
define('DIR_STORAGE', '/home/user/example.com/' . 'storage/');
userindicate the name hosting accountand instead of
example.com— the name of the main domain without subdomains.