Reputation: 1223
I'm trying to upload my laravel project to my shared hosting site. I changed the .env file to reflect the new database. I placed all the files from my laravel project into file-zilla as follows:
I moved the contents of the laravel public folder and placed it into the database public_html folder. I have also tested to see if the index.php was being called in-which it did echo the correct response. However, when I commented in all of the actual content of the index I get nothing but a blank screen without any error. Well it flashed internal 500 error for a second before disappearing. I have read online for other laravel projects issues that they needed to simply add the laravel project files and make sure the index.php from laravel is being called upon. I even tried one solution that instructed me to do this:
Bootstrap app.php
Myapp
If anyone has any experience with laravel can you please help me get my project online?
Upvotes: 0
Views: 347
Reputation: 8180
Create folder laravel in your root directory copy all data to that folder except public folder
then copy all data from public folder to folder pubic_html
now edit your index.php in your public_html folder like this:
require __DIR__.'/../laravel/bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../laravel/bootstrap/app.php';
Then change Config/database.php
and insert valid data for database connection
Upvotes: 2