# Forced to move .env, /config & /vendor to data folder

**URL:** https://discourse.roots.io/t/forced-to-move-env-config-vendor-to-data-folder/5908
**Category:** bedrock
**Created:** 2016-02-11T18:31:43Z
**Posts:** 4

## Post 1 by @mdisseny — 2016-02-11T18:31:43Z

Hi! Thanks for reading.

All set to go into production and our client’s hosting provider offers a cheap shared hosting with no chance to write on the root folder. The only alternative is to move the .env, /config and /vendor folders into a “data” folder. I managed to connect the db updating the wp-config.php path:

require\_once(dirname( **DIR** ) . ‘/data/vendor/autoload.php’);  
require\_once(dirname( **DIR** ) . ‘/data/config/application.php’);

The problem is that all the contents in the app folder are not found, no plugins, no themes. Is there anything we can do or we’d better move to a conventional WP installation?

Thanks in advanced and keep up the good work!

Cheers!

M

---

## Post 2 by @Foxaii — 2016-02-11T18:48:40Z

Although it’s not an identical scenario, reworking Bedrock’s file structure has been covered [here](https://github.com/roots/bedrock/issues/180) and [here](https://discourse.roots.io/t/bedrock-subfolder-install-on-shared-hosting/5508).

If you’ve made all the changes and it’s still not working then you’ll need to debug (check read permissions etc).

---

## Post 3 by @mdisseny — 2016-02-24T18:57:58Z

Hi, many thanks for the quick reply Foxaii. In the end we decided to change the hosting with no problem.

Cheers!

---

## Post 4 by @mdisseny — 2016-07-29T15:32:36Z

Hi! It’s been a while… just came across a similar scenario:

Folder structure example:

- data
- .env
- config
  - **application.php**
  - environments

- vendor
  - …

- web
- app
- index.php
- wp
- **wp-config.php**

Update the wp-config.php path:

require\_once(dirname(DIR) . ‘ **/data** /vendor/autoload.php’);  
require\_once(dirname(DIR) . ‘ **/data** /config/application.php’);

Update the application.php $webroot\_dir path:

/\*\* @var string Document Root \*/  
$webroot\_dir = $root\_dir . ‘ **/…/web** ’;

Hope this helps…

Cheers!
