Deploying Roots with Forge

I have seen that @kalenjohnson has mentioned that he has used Forge to deploy Bedrock using a git repository. At the moment I have:

  • Hooked up Forge to DigitalOcean
  • Created a Droplet
  • Pulled a bitbucket repository
    However, when I hit the website I get a 404.

My questions are:

  • How would I change my env.production file for an IP address?
  • Do I have to remove capistrano before I push it?
  • What environment variables do I have to setup in Forge?
  • Where do I grunt build?

As you can see any help would be appreciated :smile:

Thanks in advance,


Hey mauro,

I replied to your PM, but I’ll reply here as well:

When initially creating your project, you will still need to SSH in and create a new database and import it.

It’s also important to note that by default, when creating a new project, Forge will ask you what the public directory is. It defaults to public. If WP is installed in the root directory, you would change the public directory to nothing, or the root folder. Bedrock by default, you would use the web folder.

You do need to set up the .env file if you are using Bedrock with the correct credentials and URL’s.

You shouldn’t have to touch Capistrano, as Forge is doing that for you. You probably shouldn’t use it, but you don’t need to remove it either.

You shouldn’t need to set up any environment variables.

You run grunt build in your theme folder, same as always. You can edit the project’s automatic deployment script to cd into the theme folder and run grunt if you would like that part to be automated.

Thanks a lot @kalenjohnson I will do a small tut with what I have learned so far as soon as I get it to make it work perfectly.
Right now, and it’s driving me crazy, for some reason the scripts file is not hashing the js.min and css.min files and I have no idea why.
If I simulate a production environment in my local VM I get the hash, when I do it on the production machine - - I don’t.
The problem is that it’s not grabbing all the styling for some pages and I don’t know the reason why.
Any suggestions would be most welcome


Are you running grunt build? Are there any errors when you run that?