Bedrock subfolder install on shared hosting

Hi there,

Following up on this issue on Github, I’m trying to achieve @Foxaii’s following solution:

├── bedrock           # Config folder with .env above the web root and is only accessible on the server.
├── subdomain_bedrock # Subdomain config folder
└── public_html       # public_html becomes your web folder and is moved outside the bedrock config.
       └─ subdomain   # subdomain becomes your web folder for the subdomain_bedrock config.

I’m on a shared webhosting environment with access above the web root (public_html). In the web root live 3 wordpress installs (1 without own directory, 1 with and my Bedrock one) and I created a subfolder staging.mydomain.com for my Bedrock install.

Above the web root I uploaded my .env file & config and vendor folders:

├── .env
├── config
├── vendor
└── public_html
       ├─ wp-admin, wp-content etc.. from otherdomain.com
       ├─ someotherdomain.com
       └─ staging.mydomain.com
              ├─ .htaccess
              ├─ app
              ├─ wp
              ├─ index.html # for testing subdomain
              ├─ index.php
              └─ wp-config.php

In my .env file:

WP_HOME=http://staging.mydomain.com
WP_SITEURL=http://staging.mydomain.com/wp

In my config/application.php:

$webroot_dir = $root_dir . '/public_html/staging.mydomain.com';

In my wp-config.php:

$bedrock = realpath(dirname(__DIR__) . '/..');
require_once($bedrock . '/vendor/autoload.php');
require_once($bedrock . '/config/application.php');

The above setup results in a 500 error.
The subdomain is setup correctly on my host because the index.html works.
The PHP version is 5.5.

What am I missing here? Any help is appreciated!
Thanks

1 Like

Ah I found it!

In this file: vendor/composer/autoload_classmap.php were old references to:
/web/app/ instead of /public_html/staging.mydomain.com/app

1 Like