in your last post, you say
/home/somesharedaccount23424/public_html (Web Root (public_html/www))
but you did not mention /www previously?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I would like to share my experience in case someone gonna have similar problem!
This folder structure is suite for "Share Hosting". In case if you have more than one project
|_/home/shareaccount (Server folder)
|_ Main-app
|_ app
|_ bootstrap
|_ ...
|_ Public_html (www)
|_app
|_index.php
|_img
|_logo.png
|_css
|_master.css
<?php
namespace App;
class MyApp extends \Illuminate\Foundation\Application
{
public function publicPath()
{
return $this->basePath.DIRECTORY_SEPARATOR.'/../public_html/app';
}
}
// $app = new Illuminate\Foundation\Application(
// realpath(__DIR__.'/../')
// );
$app = new App\MyApp(
realpath(__DIR__.'/../')
);
if ($uri !== '/' && file_exists(__DIR__.'/../public_html/app'.$uri)) {
return false;
}
require_once __DIR__.'/../public_html/app/index.php';
require __DIR__.'/../../main-app/bootstrap/autoload.php';
$app = require_once __DIR__.'/../../main-app/bootstrap/app.php';
DONE!
Please or to participate in this conversation.