Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 701
Alamgir Khan Avatar asked Sep 06 '25 03:09

Alamgir Khan


2 Answers

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.

like image 68
Ziauz Avatar answered Sep 07 '25 23:09

Ziauz


It is very simple to remove / hide this dialog box:

open 'admin/controller/common/dashboard.php' file

search below line

$data['security'] = $this->load->controller('common/security');

and replace it with below line

$data['security'] = '';

That's it :)

like image 39
Kamlesh Avatar answered Sep 07 '25 23:09

Kamlesh