Web folder content moved up a level - Craft Path settings I use subdomains for staging environments. That meant in Craft 2 I had to move the public_html folder content up a level and change

$craftPath = '../craft';


To:

$craftPath = 'craft';


I'm getting myself in a bit of a mess how to do this for Craft 3. I've moved the contents of 'web' into the root folder for the subdomain.

I think I have to change these settings

define('CRAFT_BASE_PATH', dirname(__DIR__));
define('CRAFT_VENDOR_PATH', CRAFT_BASE_PATH.'/vendor');


but it's a bit over my head, so any help to what I change these to would be much appreciated.

My hosting doesn't allow configuring the webserver to point to the /web folder.

Structure:


index.php
css
js
craftcms


config
modules
storage
templates
vendor
To replicate what you did in craft 2, you would change your web/index.php to:

define('CRAFT_BASE_PATH', dirname(__DIR__,1) . '/nameofthefolderwherecraftlives');


The ,1 tells craft to go up 1 level and change /nameofthefolderwherecraftlives to well... The name of the folder where craft lives :)

So for what I show you above, your structure will be:


web


index.php

nameofthefolderwherecraftlives


config
modules
storage
templates
vendor



It's here in the docs.

Hope that helps!