Hi everyone,
I’m new to Laravel. I followed the beginner tutorial and built my first app using Herd locally. The framework feels great, but I’m struggling to deploy my project to a production server.
Is there a step-by-step guide (or best practices) for publishing a Laravel app that was developed with Herd?
@laudenz It doesn’t matter what you developed your application “with” locally. A Laravel application is just PHP files, so deploying is moving the relevant files to another server, and ensuring it is configured properly (either with an .env file with variables specifically for that server and environment, or the corresponding environment variables proper set up on that server).
It would really help if you mentioned what you were struggling with so we can better help you.
Hi @martinbean thanks for your reply.
I recently moved my Laravel project (developed with Herd) to another server.
After updating the .env values (APP_ENV, APP_DEBUG, APP_URL, DB_DATABASE), the homepage loads fine and data from the SQLite database appears as expected.
The problem is that when I click any other route (like showing a product), I get a 500 Internal Server Error — only the homepage works.
Also, uploaded images don’t appear in the browser, even though the files are on the server.
The problem is that when I click any other route (like showing a product), I get a 500 Internal Server Error — only the homepage works.
@laudenz Then you need to check error logs on your server. A 500 Internal Server Error usually means an exception is being thrown. So you need to find the exception in your logs, and fix it.