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.
I have changed my .env to reflect the database details.
- I have uploaded the laravel project to the server
2.a. I have uploaded the contents of laravel to be adjacent to public_html
2.b. I have uploaded the contents of public to the public_html folder.
I have changed the paths in index.php to
/../laravel/bootstrap/
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 changed the storage/bootstrap directories and all content to 777.
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?