How to relocate storage directory on v2?

In the older version, I could edit the bootstrap.php file in order to achieve the following structure:

root/
  cockpit/
    ...
  storage/
    ...
  other_site_resources/
  index.php
  contacts.php
  about.php

How can I move the storage dir outside the cockpit dir, in the new version?

You can override the paths in your config file

/config/config.php

<?php

return [

     'paths' => [
         '#storage' => __DIR__.'/../../storage',
         '#uploads' => __DIR__.'/../../storage/uploads',
      ],
];
2 Likes

Thanks for they quick answer. I actually did __DIR__.'/storage'.

Apparently I was close, not close enough.