Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

FounderStartup's avatar

Correct procedure to deploy laravel 8 project on server

What is the correct procedure to deploy laravel 8 project on production server ?

The net is full of advices and its very confusing. Seems to be lot of hit n trial going on :).

Any help ?

0 likes
12 replies
webrobert's avatar

Depends on your disposition. I have an old shared server that I use. Others do it differently, I'm sure they will share too. But here is a guide I wrote for my steps for shared server.

1 like
FounderStartup's avatar

@martinbean Bro we are living in different timezones :) . I posted this query when I went to sleep and checking it when I woke up. I hope you will understand :). Thanks for your effort.

FounderStartup's avatar

@Snapey NO it's not. Maintaining the app happens after you successfully deploy the app :). Unfortunately I am facing issues in deploying the app at the very first stage.

jlrdw's avatar
jlrdw
Best Answer
Level 75

Also companies like digital ocean and AWS actually have guides on this subject. I would advise follow one of those and not just some personal blog or YouTube video.

Or use Forge.

1 like
FounderStartup's avatar

@jlrdw Nice. Youtube is full of crap and everyone is sounding like a GURU :) just to get more views.

FounderStartup's avatar

My query is what are the steps required for deployment :

As I understand I need to clear cache of the the local. Then copy the files.

I am hosting on a subdomains, so its giving 500 server error. What is the correct .htaccess files in the root and in the public folder ?

By deployment I meant the steps required to be done in addition to copying on the server :)

Sinnbeck's avatar

@FounderStartup this is my exact work flow

Locally

  1. git add .
  2. git commit -m "some message"
  3. git push

Now I wait for tests to be green on github actions

Then I open the ploi dashboard and click the deploy button. If I use staging, I click Deploy to staging, check it in a browser, and then Deploy production

Please or to participate in this conversation.