@ricki Which version of php do you have on that server? Remember laravel 5.1 requires php>=5.5.9
Coincidentally i had to do this twice today for clients. Shared hosting can be a pain. smh.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have made a project using laravel but have no experience in uploading it to production. I am using a shared hosting site DirectAdmin. Here are the steps I have taken so far.
as user SID has posted a few times i have also done the following
I created the following in my bootstrap/app.php // $app = new Illuminate\Foundation\Application( // realpath(DIR.'/../') // );
$app = new App\MyApp(
realpath(__DIR__.'/../')
);
php artisan clear-compiled
composer dump-autoload
In MyApp I have the following :
<?php namespace App;
use Illuminate\Foundation\Application;
class MyApp extends Application
{
public function publicPath()
{
return $this->basePath.DIRECTORY_SEPARATOR.'www';
}
}
With all of this configured I still get white screen with no errors. I have read around the web that maybe i need to change my directory permissions to 777. should this be everfile on the laravel project? I have read that the .htaccess needs to go outside of the public_html folder? also to check to see if i'm running php 5.3 or better (i dont know how to do this on directadmin). I commented out the entire index.php and successfully got it to echo 'hello world'. so i know it is pointed at the right document. is there anything that I am missing or did wrong to get this project online?
Please or to participate in this conversation.