0
votes

In my localhost I can run Laravel using composer without any problem. But I don't know how to move my Laravel project to live server.

I just copied all items which is in Public folder to Public_html. Then other items are placed into Laravel folder. Put this folder into Public_html. I have changed the index.php coding like this.

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

But still my site shows

page isn’t working..is currently unable to handle this request.HTTP ERROR 500

Public_html folder like this enter image description here

2
I have tried that way also many time. But same error occurs. That is why I have changed like above.Test sample
Not sure if it would make any difference but did you clear your config cache etc?Andy Holmes
What I will do on config cache ? @Andy Holmes kindly explainTest sample
php artisan cache:clear i don't think it'll alter your problem. Unfortunately I'm not sure on how to fix your issue, the linked question to me should fix your issues. Who are you hosting with?Andy Holmes

2 Answers

0
votes

if you can not provide a link to the web root of the shared folder!

  1. All except the Public folder to move to a higher level, such as a folder laravel - http://prntscr.com/bryvu7 (Maybe on hosting your folder - public. not a folder public_html)

  2. Change file publi_html/index.php line

    require __DIR__.'/../bootstrap/autoload.php';

to

require __DIR__.'/../laravel/bootstrap/autoload.php';

And line

$app = require_once __DIR__.'/../bootstrap/app.php';

to

$app = require_once __DIR__.'/../laravel/bootstrap/app.php';
$app->bind('path.public', function() {
    return __DIR__;
});
  1. Change file laravel/server.php line

    require_once __DIR__.'/public/index.php';

to

require_once __DIR__.'/index.php';
0
votes

This error you can get due to vendor folder missing in live server Please follow this is this answer. Link