
Kick off the Heroku for PHP course with a step-by-step, code-along intro to deploying PHP applications to Heroku, and access support for a smooth, five-star learning experience.
Get help quickly by posting questions in the course Q&A and course overview discussions, where peers answer and instructors respond, including via personal messages.
Access the example code from the GitHub repo, browse intuitively named lesson folders, and use the etc/Apache config guide to support your Heroku for PHP projects.
Sign up for a free Heroku account at heroku.com to start your first application; no card is required, and adding a card increases free hours from 500 to 1000.
Install the Heroku toolkit for the command line to enable access, using the Mac installer or Homebrew, Windows 64-bit, or Linux, then create your first Heroku app.
Learn practical Windows setup steps to get up and running, following the same workflow used on Mac and Linux so you can follow along with the course.
Install git and the Heroku CLI on Windows, covering 32-bit and 64-bit options, installation steps, and checkout as and commit as settings.
Install the Heroku CLI on Windows by following the installer prompts, bypassing the SmartScreen warning, and finish the installation to enable command line access.
Open Git Bash on Windows after installation to run Git and Heroku commands, using the Heroku CLI in the same terminal.
Set up your Heroku account and command line, create a simple hello world app using Flight, configure composer to specify PHP 5.6, run composer install, and push to Heroku.
Create an index.php, use composer autoload, and define a flight micro-framework route with a closure to run a basic PHP page, then prepare deployment to Heroku.
Create a Procfile to tell Heroku how to run your PHP app on push. Use Apache by default or nginx, and specify the path web:vendor/bin/heroku-php-apache2 in the project root.
Learn how to push a PHP app to Heroku using git, create a .gitignore to exclude vendor, initialize a git repo, and commit key files like Procfile, Composer.json, and Composer.lock.
Push your PHP app to Heroku by logging in, creating an app, and pushing master; Heroku bootstraps PHP, installs dependencies with Composer, and runs via Apache or nginx.
Learn how config vars store environment-specific settings, like the database name, in Heroku PHP apps, replacing clumsy environment checks with a single, testable approach across development, staging, and production.
Add a local config var by editing your host file and creating an Apache virtual host, then set an environment variable like PROJECT_NAME to Heroku for PHP Dev.
Fetch the environmental variable PROJECT_NAME in PHP with getenv and display a dynamic welcome like 'Welcome to Heroku for PHP Dev'.
Commit your PHP code to the repo and push to Heroku with git push heroku master, then open the app to see a welcome page until you set environment variables.
Set up Heroku config vars for PHP apps using dashboard or command line, defining PROJECT_NAME for live and dev environments.
Learn what add-ons are on the Heroku platform, including built-in and third-party services like MySQL, MongoDB, and SendGrid, and how they auto-configure environment variables for easy connection.
Explore using Heroku add-ons to access a MySQL database for PHP apps, with JawsDB or MariaDB, via web or command line and configure the connection string.
Explore the add-ons dashboard by running Heroku addons to view your database status, connection string, host names, and the option to reset the password, with server stats and third-party docs.
Mirror the Heroku JawsDB URL locally by copying the JawsDB URL into the Apache config and restarting local Apache, so both local and Heroku share the same database connection.
Learn to establish a MySQL connection in PHP on Heroku by parsing a database URL with parse_url, reading env vars with getenv, and connecting via mysqli.
Push the updated local app to Heroku master after committing the MySQL connection, then rely on the Heroku environment variable to connect to the database.
Learn to troubleshoot errors on Heroku for PHP by deliberately breaking the app, disabling Flight's error handling, and observing standard PHP errors before diagnosing production issues.
Push code to Heroku and troubleshoot by inspecting Heroku logs from the command line, using --tail to view the uncaught exception and locate the error in index.php line 8.
Roll back to a stable version using the git-based log and the Heroku rollback command. Then fix the code and redeploy.
Utilize Rollbar to monitor errors on Heroku with a free add-on, configure the access token via Heroku config, and install the client and server libraries in PHP.
Install the Rollbar client library in a PHP project via Composer, initialize Rollbar with an access token and environment, and verify error logging using the Rollbar console.
Use the heroku addons command to open Rollbar dashboard, review the latest 24-hour errors with a full stack trace, and troubleshoot in production while hiding the error on the phone.
Configure a custom domain for your Heroku app by adding it in settings, creating a CNAME or root domain with your DNS provider (Cloudflare), and awaiting propagation.
Move the index file into a public directory to avoid security problems, then configure Apache and Heroku to use public as the web root, restart, and verify the site.
Learn how to enable a php extension on Heroku by adding image magick to composer.json, running composer update, and redeploying while checking logs for imagick issues.
Switch from Apache to nginx on Heroku by editing the Procfile, push the app, then reload to verify nginx is running.
Celebrate completing the Heroku for PHP course by launching your first application, configuring it, using resources and add-ons, and troubleshooting while customizing your runtime environment.
Are you a PHP programmer? If so, this course will get you up to speed with Heroku in record time.
Invest just one hour of your life to learn to use Platform-as-a-Service (PaaS) cloud hosting and I promise you that you will fall in love, as well as adding a valuable skill to your CV.
Following along step-by-step, you will:
* Deploy your first web application to the cloud
* Use add-ons such as MySQL databases and performance tracking
* Troubleshoot errors using the Heroku CLI
* Configure and customise your virtual server
Click the "Buy Now" button to get started immediately. The course comes with lifetime access to the videos and materials. If you don't love it, just use the 30-day money-back guarantee.
Now updated with an additional module on how to setup Heroku on Windows.
What is Heroku?
Heroku is a cloud hosting platform that allows you to deploy websites and web applications with a simple Git push.
Heroku manages the environment, including installing PHP and Apache on your own virtual server: all you have to do is tell it what to do and Heroku does the rest.
What should I learn Heroku?
If you run your own website, Heroku is a cost-effective and convenient way to host it without having to manage your own server or be dependent on your hosting company to give you the correct version of PHP.
If you are an employee, many companies are converting to cloud platforms such as Heroku. Therefore, having this skill on your CV will increase your employment opportunities and make you more valuable to your existing employee.
Why should I sign up for this course?
I've designed this course to get you up to speed as fast as possible. We will dive straight in and write code: you can follow along with all of the examples and get your first web application live in the first hour.
I've been working as a software consultant for over ten years, as well as being a teacher here on Udemy and I will be here to help you every step of the way.