This project is a template for installing and running WordPress on Heroku. The repository comes bundled with PostgreSQL for WordPress and WP Read-Only.
Clone the repository from Github
$ git clone git://github.com/mhoofman/wordpress-heroku.git
With the Heroku gem, create your app
$ cd wordpress-heroku
$ heroku create
Creating strange-turtle-1234... done, stack is cedar
http://strange-turtle-1234.herokuapp.com/ | git@heroku.com:strange-turtle-1234.git
Git remote heroku added
Add a database to your app
$ heroku addons:add heroku-postgresql:dev
Adding heroku-postgresql:dev to strange-turtle-1234... done, v2 (free)
Attached as HEROKU_POSTGRESQL_COLOR
Database has been created and is available
Use `heroku addons:docs heroku-postgresql:dev` to view documentation
Promote the database (replace COLOR with the color name from the above output)
$ heroku pg:promote HEROKU_POSTGRESQL_COLOR
Promoting HEROKU_POSTGRESQL_COLOR to DATABASE_URL... done
Create a new branch for any configuration/setup changes needed
$ git checkout -b production
Store unique keys and salts in Heroku environment variables. Wordpress can provide random values here.
heroku config:set AUTH_KEY='put your unique phrase here' \
SECURE_AUTH_KEY='put your unique phrase here' \
LOGGED_IN_KEY='put your unique phrase here' \
NONCE_KEY='put your unique phrase here' \
AUTH_SALT='put your unique phrase here' \
SECURE_AUTH_SALT='put your unique phrase here' \
LOGGED_IN_SALT='put your unique phrase here' \
NONCE_SALT='put your unique phrase here' \
Deploy to Heroku
$ git push heroku production:master
-----> Heroku receiving push
-----> PHP app detected
-----> Bundling Apache v2.2.22
-----> Bundling PHP v5.3.10
-----> Discovering process types
Procfile declares types -> (none)
Default types for PHP -> web
-----> Compiled slug size is 13.8MB
-----> Launcing... done, v5
http://strange-turtle-1234.herokuapp.com deployed to Heroku
To git@heroku:strange-turtle-1234.git
* [new branch] production -> master
<