<commit_before># WordPress Heroku

This project is a template for getting [WordPress](http://wordpress.org/) up and running on [Heroku](http://www.heroku.com/). It comes with [PostgreSQL for WordPress](http://wordpress.org/extend/plugins/postgresql-for-wordpress/) pre-installed in order to use Heroku's existing Postgres backend.

Installation
============

Clone the repository from Github

    $ git clone git://github.com/mhoofman/wordpress-heroku.git
    
With the [Heroku gem](http://devcenter.heroku.com/articles/heroku-command), create your app

    $ cd wordpress-heroku
    $ heroku create --stack cedar
    > Creating strange-turtle-1234... done, stack is cedar
    > http://strange-turtle-1234.herokuapp.com/ | <EMAIL>:strange-turtle-1234.git
    > Git remote heroku added

Add a database to your app

    $ heroku addons:add shared-database:5mb
    > -----> Adding shared-database:5mb to strange-turtle-1234... done, v3 (free)
    
Retrieve database info (You'll need this info when setting up the WordPress config)

    $ heroku config
    > DATABASE_URL          => postgres://username:password@host/database_name
    > SHARED_DATABASE_URL   => postgres://username:password@host/database_name

Create a new branch to modify and save database configuration

    $ git checkout -b "production"
    
Copy and edit the `wp-config.php` with the database info from the previous step

    $ cp wp-config-sample.php wp-config.php
    $ mate wp-config.php # input and save database info

Enter in database info from `heroku config`

    /** The name of the database for WordPress */
    define('DB_NAME', 'database_name');

    /** Database username */
    define('DB_USER', 'username');

    /** Database password */
    define('DB_PASSWORD', 'password');

    /** Database hostname */
    define('DB_HOST', 'host');
    
Clear `.gitignore` and commit `wp-config.php`

    $ >.gitignore
    $ git add .
    $ git commit -m "zomg wordpress"
    <commit_msg>Removed database settings steps from readme<commit_after># WordPress Heroku

This project is a template for getting [WordPress](http://wordpress.org/) up and running on [Heroku](http://www.heroku.com/). It comes with [PostgreSQL for WordPress](http://wordpress.org/extend/plugins/postgresql-for-wordpress/) pre-installed in order to use Heroku's existing Postgres backend.

Installation
============

Clone the repository from Github

    $ git clone git://github.com/mhoofman/wordpress-heroku.git
    
With the [Heroku gem](http://devcenter.heroku.com/articles/heroku-command), create your app

    $ cd wordpress-heroku
    $ heroku create --stack cedar
    > Creating strange-turtle-1234... done, stack is cedar
    > http://strange-turtle-1234.herokuapp.com/ | <EMAIL>:strange-turtle-1234.git
    > Git remote heroku added

Add a database to your app

    $ heroku addons:add shared-database:5mb
    > -----> Adding shared-database:5mb to strange-turtle-1234... done, v3 (free)

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

Clear `.gitignore` and commit `wp-config.php`

    $ >.gitignore
    $ git add .
    $ git commit -m "zomg wordpress"
    
{'fraction_non_alphanumeric': 0.12002468373958655, 'fraction_numerical': 0.011724776303609998, 'mean_word_length': 3.3169107856191746, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4371610', 'n_tokens_mistral': 1035, 'n_tokens_neox': 959, 'n_words': 296}