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

Blindacme's avatar

CSS/JS Not working in production but works on MAMP

I just watched the series about setting up Forge with Digital Ocean. Everything works fine on MAMP but when I push from Github to Production my CSS and JS files are returning a 404 error. When setting up the site in Forge I used the default /public file path. Even if I try changing from https://mydomain.com/bower_components/adminlte/bootstrap/css/bootstrap.min.css to https://mydomain.com/public/bower_components/adminlte/bootstrap/css/bootstrap.min.css nothing is found.

I updated my config/app.php domain to point to my domain now instead of localhost. All the references to my styles and scripts are like this: <link rel="stylesheet" type="text/css" href="{{ asset ("/bower_components/adminlte/bootstrap/css/bootstrap.min.css") }}">

What am I doing wrong? Why won't my styles and scripts load?

0 likes
8 replies
Blindacme's avatar

@lars6 No, I was hoping to not have to do too much from the command line is why I went with Forge. Do I need to configure SSH and then get into the server to run that command? Or is this something I can do with the Recipes feature of Forge? I'm a complete noob :)

Lars-Janssen's avatar

If you install the repo normally forge does this for you. It runs composer install and npm install.

But you can always ssh into the server and go to your project. Then npm install to be sure.

If I where you I would add this to my gulp file (don't know what Laravel version you are using?).

Blindacme's avatar

@lars6 I am using Laravel 5.3 - Gulp is somewhat new to me as well but I remember working with it briefly through the first part of the Getting Started Series.

I have already built out my app, how would you suggest me moving forward in resolving this without much knowledge of SSH?

Please or to participate in this conversation.