Heroku/PHP Quick Tip #1 – Webroot

MAY 1, 2014

So I checked out Heroku yesterday after the “official support for PHP” announcement. I pushed up a basic install of Laravel 4.1 to a new free account. However, if you just create your repo, set up Laravel, and do a

git push origin master

, your webroot will be the project root, not /public.

After reading about “buildpacks”, etc., I found out that all you need to do is create an empty file in the project root named “Procfile” and add

web: vendor/bin/heroku-php-apache2 public

to it (assuming you are using Apache).

I saw something else showing custom composer.json settings for heroku that defined the webroot, but I couldn’t get that to work.

PHP 
comments powered by Disqus