Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. masainox created this gist May 13, 2013.
    40 changes: 40 additions & 0 deletions install-wordpress-heroku-with-cleardb.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    # WordPress Heroku with ClearDB

    # Clone the repository from Github
    git clone git://github.com/masainox/wordpress-heroku-with-cleardb.git
    cd wordpress-heroku-with-cleardb

    # Create your app
    heroku create YOUR_APP_NAME -s cedar -b git://github.com/iphoting/heroku-buildpack-php-tyler.git

    # Add a database to your app
    heroku addons:add cleardb:ignite

    # Create a new branch for any configuration/setup changes needed
    git checkout -b production

    # Copy the "wp-config.php"
    cp wp-config-sample.php wp-config.php

    # Update unique keys and salts in `wp-config.php` on lines 48-55. Wordpress can provide random values [here](https://api.wordpress.org/secret-key/1.1/salt/).
    #
    # define('AUTH_KEY', 'put your unique phrase here');
    # define('SECURE_AUTH_KEY', 'put your unique phrase here');
    # define('LOGGED_IN_KEY', 'put your unique phrase here');
    # define('NONCE_KEY', 'put your unique phrase here');
    # define('AUTH_SALT', 'put your unique phrase here');
    # define('SECURE_AUTH_SALT', 'put your unique phrase here');
    # define('LOGGED_IN_SALT', 'put your unique phrase here');
    # define('NONCE_SALT', 'put your unique phrase here');

    # Commit wp-config.php
    git add wp-config.php
    git commit -m "Initial WordPress commit"

    # Deploy to Heroku
    git push heroku production:master


    # Switch language
    # $ heroku config:add WORDPRESS_LANG=ja # ja
    # $ heroku config:add WORDPRESS_LANG='' # en