Set up a drupal site on heroku

Drupal is an open-sourced PHP-based content management system. It is very easy to extend and customize because of its modular structure.

Heroku is a great cloud hosting platform. At the beginning it only supported Ruby on Rails framework. Now it also supports PHP, NodeJS, Scala, Python, Java and Clojure. It is great because you can make a full-fledged live website in minute at zero cost.

Like with many other web applications, a machine which runs Linux operating system is preferred, and this post will assume you have knowledge of how to configure a local PHP environment. The tools you will use includes githeroku toolbelt.

Without dragging anymore, here are the steps you need to do:

  1. Download newest drupal package from the official drupal site
  2. Extract the file
  3. Download Composer to the extracted folder
  4. Get a copy of sample php application from the Get Started with PHP on Heroku
  5. Copy composer.json and composer.lock in the sample app to your drupal folder
  6. Modify composer.json, delect default modules and add ext-gb and ext-mbstring module to require field
  7. Run php composer.phar update
  8. Run heroku create –http-git to make a new Heroku app
  9. Rename the new app by heroku apps:rename newname –app oldname
  10. Add heroku to git remote ropository by heroku git:remote -a yourapp (this step is only necessary when heroku complains it’s not a remote ropository)
  11. Run heroku addons:add heroku-postgresql:hobby-dev to add a PostgreSQL database
  12. Copy database.setting.php to setting.php in sites/default folder under your drupal folder
  13. Open you Heroku website, go to your new app, open database setting to see your database information
  14. Add database information found in last step to setting.php
  15. Use git push to deploy the site to heroku

That’s it.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close