Publishing your Laravel project on Shared Host Server (Yeap!, Media Temple, GoDaddy, etc).

Oscar Gonzalez
2 min readJul 18, 2020

Ok to the point, you had working to hard in a Laravel project maybe used the last version framework, keeping the original structure of folders created by CLI and it’s almost done, but, your final user (maybe your client), says “Oh right dude, everything is goes like a charm!, ¿Can you publish the project in my shared host please?” … “Shared”!, and you know very well that Laravel Framework was not designed to work well in shared hosting, so what can you do?, okey, keep calm and follow the next steps:

  1. In your root folder, where all files and folders of you project were created, create a new folder and rename as “Local” (or any name you like)
  2. Move all you folders and files of the root folder, except the “public” folder to the new “Local” folder
  3. Copy or move out all the files and folders of the “public” folder to the root folder
  4. You will get some folders structure like this:

5.- Open the “index.php” file and edit it to make reference to “local” folder created like this

6.- Almost done, go to the “local” folder, open the “.env” file and make sure your project has a “App_Key”, otherwise, create it using “php artisan key:generate” in terminal.

7.- Use you favorite FTP client to upload the project in you “Shared Host” and test.