126.96.36.199. 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 188.8.131.52 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":
To transfer a directory
storageoutside the root directory of the site, do the following:
- Through filemanager or any FTPclient transfer directory
storageof site root directory one level up — to the directory with the name of the main domain (so that it is accessible along the path
example.com— the name of the main domain).
- 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.