So, I have to deploy a drupal 8 site to a host which doesn't provide functionality to specify an entry point for a Drupal site which is nested below the site root folder. How can I update the folder structure to have everything in the server's site root?
What I tried initially was to move the contents of the
site_root/web/ folder up to the site root, but this causes 500 errors. I'm not sure since I can't see the errors on the host server, but replicating the scenario on my dev machine points to the autoloader.php file looking in the wrong place
PHP Fatal error: require(): Failed opening required '/var/www/html/ab-test/../vendor/autoload.php'.
I have tried to resolve this by first following the suggestion to re-run
composer install from the site root but that doesn't seem to help. When I manually update where the autoloader.php should be looking, I then get this error
PHP Warning: require(/var/www/html/ab-test/vendor/composer/../../load.environment.php) which again suggests that the file/folder structure is being set somewhere I'm not thinking of or don't have enough experience to check.
So, my convoluted question comes down to how do I switch from a nested to a non-nested folder structure without everything freaking out?