For those who are awake!
Discount -15%
We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.13.4.24. Moving the storage directory outside of the OpenCart root directory

Site backup functionality does not cover directories that are moved outside the site root directory. Such directories will only be available in backup hostingaccount.

In OpenCart, for more security of site files, 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:

  • Catalog storage located in root directory of the site.
  • OpenCart version 3.0.3.0 or higher is used.
  • No changes were made to OpenCart settings.
  • Directory movement functionality storage provided by the CMS... In this regard, there may be additional conditions for its correct operation.

For automatic catalog transfer storage do the following:

  1. Go to the section "Dasboard"In the left pane:
  2. If all the conditions are met, a modal window will appear with a proposal to move the catalog storage outside the site directory. To move the directory, click “Move»:
To transfer a directory storage outside the root directory of the site, do the following:
  1. Via filemanager or any FTPclient transfer directory core of 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/core/where example.com - the name of the main domain).
  2. 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/');

    Instead user indicate the name hostingaccountand instead of example.com - the name of the main domain without subdomains.