Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PrettyRicki's avatar

White Space with DirectAdmin Laravel upload

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.

  1. I have changed my .env to reflect the database details.
  2. 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.
  3. 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

  1. 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
    
  2. 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?

0 likes
1 reply
sid405's avatar

@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.

Please or to participate in this conversation.