Support the ongoing development of Laravel.io →
Configuration Database
Last updated 2 years ago.
0

Hello amisanjid,

First of all you need to change your db credentials to your current db credentials. Also you want to laravel outside of your webroot.

But you do want to have laravel's files that live in the public folder in your public_html folder from your hosting company.

0

1- check you database config.

2- create a folder at the same level as public_html and call it e.g 'laravel'.

3- place all your files in the laravel folder EXCEPT the public folder

4- place the CONTENT of your public folder in the public_html folder.

5- go to public_html/index.php and make the following changes:

Change:

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

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


To:


 - require __DIR__.'/../laravel/bootstrap/autoload.php';
 - $app = require_once __DIR__.'/../laravel/bootstrap/app.php';
Last updated 8 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

amisanjid amisanjid Joined 6 Dec 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.