Level 12
So the directory structure is ?
/home/somename/public_html
/home/somename/websitefolder
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
im trying to deploy my laravel app on shared server , i put the files under public into public_html and rest of the files in a folder named as websitefolder.
In the index.php file under public i change
require __DIR__.'/../websitefolder/vendor/autoload.php';
$app = require_once __DIR__.'/../websitefolder/bootstrap/app.php';
I get the below error in log
PHP Warning: require(/home/somename/public_html/../websitefolder/bootstrap/autoload.php): failed to open stream: No such file or directory in /home/somename/public_html/index.php on line 25
PHP Fatal error: require(): Failed opening required '/home/somename/public_html/../websitefolder/bootstrap/autoload.php' (include_path='.:/opt/alt/php71/usr/share/pear') in /home/somename/public_html/index.php on line 25
How to publish
Please or to participate in this conversation.