Heroku PHP Support will be applied to applications only when the application has a file named composer. json in the root directory. Even if an application has no Composer dependencies, it must include an empty composer. json in order to be recognized as a PHP application.
000webhost. 000webhost is a free web host that support PHP and MySQL apps. It also comes with a control panel which has PhpMyAdmin and a web-based file manager. Although 000webhost enables deploying your web app via file upload and is free of charge, it also comes with great security risks.
Github pages currently do not support PHP as it only supports static website. However, if you want to display some dynamic content on your website, you can simply use iframe to display that content, but again it has to be hosted somewhere else.
You need to create your Heroku app on the new Cedar stack. Cedar stack apps reside on the domain herokuapp.com rather than heroku.com, so you'll know if you've got the right one. Then it's really as simple as pushing your PHP files. To create an app on the Cedar stack, use:
heroku create
Or, if you'd like to set a name, (i.e. myname.herokuapp.com) use:
heroku create myapp
For the benefit of others who are not as au fait with Git, you will also need to set up, commit and push your Git repository:
git init
git add .
git commit -m 'Initial commit'
git push heroku master
That's it! Good luck and have fun.
You don't need to do anything - just push your PHP code up and Heroku magic will occur - I'm no PHP guru but recently had to deploy a PHP site and I just pushed the code as is to a new Cedar app, no changing of directory structures etc and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With