skip to Main Content

I am the designer for a small business and I have been tasked with trying to get a Laravel project to work on the customer’s server. I am not a PHP expert and only know a small amount – I’ve taken this on at very short notice due to a very tight deadline and my clients inability to find anyone else at such short notice.

I have attempted a Google search but nothing seemed to help. The file structure of the cPanel is as follows:

cPanel structure

file structure

All of which is inside the handymans-hardware.co.uk folder. When I navigate to the domain root I can just see the file tree and when navigating to root/public in the browser I get an error. How can I set this up? It seems the developer that built this didn’t set it up correctly and has caused some issues.

Here is the error:

public error

Line 50 of index.php is $kernel = $app->make(IlluminateContractsHttpKernel::class);

2

Answers


  1. Looking at the screen shots, it appears you did not upload the site content to public_html?, I could be wrong, but upload what you have inside of the project folder “handymans-hardware.co.uk” directly to public_html (seems simple and you may have done this, but thought I would ask)

    Appears there is some SQL table errors triggered as well navigating to: http://www.handymans-hardware.co.uk/shop

    Login or Signup to reply.
  2. When uploading Laravel to cPanel there are some few things you have to note

    1. is your hosting provider having php 7.2 enabled
    2. are your files in the public html directory
    3. copy every thing in the public directory of your Laravel application and paste them at your root directory
    4. if you have done that then check your index.php file that have now been moved to the root directory and do this
    5. look for this lines of code in the index.php

      require __DIR__.'/../vendor/autoload.php';
      
      $app = require_once __DIR__.'/../bootstrap/app.php';
      

      Then edit those two above to this

      require __DIR__.'/vendor/autoload.php';
      
      $app = require_once __DIR__.'/bootstrap/app.php';
      

    If you are still confused view this video tutorial: Youtube Upload Laravel to cpanel

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search