opencartopencart-3

Move the storage directory outside of the web directory


In opencart version 3 there is a notification:

It is very imporant that you move the storage directory outside of the web directory (e.g. public_html, www or htdocs)

Screenshot Screenshot

I tried by clicking on move button in the picture also tried manually but after trying it is giving weird errors.


Solution

  • You can move storage directory outside of the web directory (e.g. public_html, www or htdocs) in three ways

    1. Automatically Moving
    2. Manual Moving (from admin panel)
    3. Manual Moving ( By editing Config files)...

    Assuming that you know first and second methods.Here I will explain the third method to you.

    1. Copy your storage directory from system/storage to public_html, www or htdocs.
    2. Change the following file path from both config files i.e. config.php and admin/config.php as shown below.

      define('DIR_STORAGE', 'public_html/storage');

    Please replace public_html to your desired path.

    I hope this answer might help you.