Deploy Laravel To Shared Hosting The Easy Way
Why Stack Overflow recommends it
Stack Overflow users link it when answering or following along with Laravel shared-hosting deployments, especially the public_html and index.php path setup.
Recommended by 5 people across 4 different months, 2017 to 2022.
What it is
A Traversy Media tutorial showing how to deploy a Laravel app to a shared hosting account using only cPanel and FTP, with no command line. It walks through uploading the project, moving the public folder contents into public_html, and editing index.php paths.
What people said
Recommends Brad Ahrens · 2017-07 · Stack Overflow · on “Laravel-Localization Deployment - The requested URL /en was not found on this server”
Good question @xperator. This is actually my first time deploying a Laravel site. So, I'm not really sure about that. I'm following this tutorial: [this video] - which recommended changing the index.php file in the way that I did.
Recommends Theodore R. Smith · 2018-03 · Stack Overflow · on “How to deploy Laravel 5.5 app to Godaddy cPanel shared hosting”
The biggest problem you have is that GoDaddy's latest supported version of PHP is v5.6. Laravel v5.5 and later all require PHP v7.0 or higher. Apparently, they added PHP 7 support in late 2017. I'd still highly recommend shifting to a much more reputable host like (closest comparison) BlueHost.com or DigitalOcean.com. The second biggest problem you have is that GoDaddy won't let you actually run the artisan command, which Laravel really needs. It means 1. needing to apply database creation and migrations manually and 2. running all the artisan commands locally and uploading the entire project, in situ. The third biggest problem is that composer doesn't run on GoDaddy [LINK] , meaning you'll
Recommends Ahsan · 2018-03 · Stack Overflow · on “How to remove "public/index.php" in laravel 5.4 project for both local and shared hosting server?”
in shared hosting, you need to upload everything except public folder into the app folder. the content of public folder will go into public_html folder. then edit index.php. this will help you: [this video]
Recommends mark820850 · 2019-11 · Stack Overflow · on “Laravel how to update view in shraed hosting?”
I have shared hosting on GoDaddy and I deployed laravel project the problem I am facing is the following: I updated view file but it seem that laravel is serving old view. I followed this youtube video for deployment [this video] how to make laravel serve my new view?
Recommends Devinloper · 2019-12 · Stack Overflow · on “css and js not found deployment laravel 6 shared hosting”
If you're having trouble with deploying your Laravel application to a shared hosting, consider watching this YouTube tutorial [this video] on deploying to a shared hosting. It covers most of what you need to do to correctly deploy to a shared hosting without too much trouble. Hope this helps!
Cites Stacy Thompson · 2017-12 · Stack Overflow · on “Laravel Error on Production on HasApiToken”
I am new on laravel and I have created a basic dashboard with the api endpoints. Everything works fine on Localhost , but when I have hosted it on the server I get an error saying Class Laravel\Passport\HasAPITokens; not found on User.php Here s what my user.php looks like <?php namespace App; use Illuminate\Notifications\Notifiable; use Illuminate\Foundation\Auth\User as Authenticatable; use Laravel\Passport\HasAPITokens; class User extends Authenticatable { use Notifiable, HasApiTokens; protected $fillable = [ 'name', 'email', 'password', ]; protected $hidden = [ 'password', 'remember_token', ]; } ?> Also the api endpoint also stopped working saying the Controller class I have created is n
Cites Roy Gallardo · 2018-03 · Stack Overflow · on “laravel 5.5 axios on shared hosting sub folder api not working”
I created brand new laravel 5.5 project on localhost all is working, api, route, auth etc.. I uploaded it on my sharedhosting by following [this video] tutorial, and all works. except on axios request on app.js It say [LINK] not found [LINK] not found [LINK] not found [LINK] not found My work around is to config the public/js/app.js code by adding subdomain. axios.get('[subdomain]/oauth/clients') <-- add manually and it's working but any simple solution for this directory problem ? thank you
Cites abu abu · 2018-05 · Stack Overflow · on “Laravel in Shared Hosting”
I am trying to install a Laravel application in Shared Hosting following this [this video] tutorial where my server's PHP version is 7.1.17 and my Laravel version is 5.6.15. When I am trying to browse my application using Chrome I can see only a White page, even no error is there. I tried to debug the application and found that below code of index.php is not working. $response = $kernel->handle( $request = Illuminate\Http\Request::capture() ); What is the solution of this issue?
Cites emir · 2019-07 · Stack Overflow · on “Laravel deployment - Fatal error: Call to a member function make() on string”
I am trying to deply laravel app (Laravel 5.4.36), and I uploaded content of the public directory to public_html, and other folders are uploaded in root footer of my hosting username. Index.php paths are modified to load bootstrap/autoload.php and bootstrap/app.php based on new paths, and I ensured that the index.php has permission to access those files. The problem is that I get this message when I try to access index.php Fatal error: Uncaught Error: Call to a member function make() on string in /home/myuser/public_html/index.php:54 Stack trace: #0 {main} thrown in /home/myuser/public_html/index.php on line 54 and the line referred here is $kernel = $app->make(Illuminate\Contracts\Http\Kern
Cites Berkay · 2020-07 · Stack Overflow · on “Error 404: Hosting Laravel app on webhost”
I have been trying to put my Laravel app on a webhost. Had some problems doing so, in the end I managed to get it working. CSS loads, the components load, everything works like it should, except the functionality of the controllers. It is impossible for me to login/register. I have been following this tutorial all the way: [this video] The steps I've taken to get it to work which is also discussed in the video are the following: Zipping the whole Laravel project and uploading it on the FTP under the subdomain, so the folder would be project.site_url.com->laravel_project_directory. Unzipping the zip file via the filemanager of cpanel The extracted files are the following: files in project director