<commit_before># Wordpress on Dokku

- [Wordpress](http://wordpress.org)
- [Dokku](http://dokku.viewdocs.io/dokku)

## How-to

### For the Wordpress developer

1. Remove everything from your Wordpress installation with the exception of `wp-content`.
2. Download and put the following files present in this repository along with `wp-content`:
    - `.htaccess`
    - `.user.ini`
    - `index.php`
    - `wp-config.php`
    - `composer.json`
    - `composer.lock`
3. Remove `wp-config.php` and `.htaccess` from your `.gitignore` and add these lines:
    ```
    wordpress/
    vendor/
    wp-content/plugins/*
    wp-content/uploads/*
    !wp-content/plugins/index.php
    !wp-content/uploads/index.php
    ```
4. Commit everything.

### For the system administrator

1. Make sure you have support for `dokku storage` and the plugin for MariaDB installed.
2. Create a new application and mount two storage points:
    - `/var/lib/dokku/data/storage/<application>/plugins:/app/wp-content/plugins`
    - `/var/lib/dokku/data/storage/<application>/uploads:/app/wp-content/uploads`
3. Create and link a new database instance.
4. Move `nginx.conf.d/wordpress.conf` to `/home/dokku/<application>/nginx.conf.d/wordpress.conf` and restart nginx.
5. Deploy and profit.

You should set the following environment variables:<commit_msg>Better instructions about gitignore<commit_after># Wordpress on Dokku

- [Wordpress](http://wordpress.org)
- [Dokku](http://dokku.viewdocs.io/dokku)

## How-to

### For the Wordpress developer

1. Remove everything from your Wordpress installation with the exception of `wp-content`.
2. Download and put the following files present in this repository along with `wp-content`:
    - `.htaccess`
    - `.user.ini`
    - `index.php`
    - `wp-config.php`
    - `composer.json`
    - `composer.lock`
3. Add these lines to your `.gitignore`:
    ```
    wordpress/
    vendor/
    wp-content/plugins/
    wp-content/uploads/
    ```

    And remove these:

    ```
    wp-config.php
    .htaccess
    ```
4. Commit everything.

### For the system administrator

1. Make sure you have support for `dokku storage` and the plugin for MariaDB installed.
2. Create a new application and mount two storage points:
    - `/var/lib/dokku/data/storage/<application>/plugins:/app/wp-content/plugins`
    - `/var/lib/dokku/data/storage/<application>/uploads:/app/wp-content/uploads`
3. Create and link a new database instance.
4. Move `nginx.conf.d/wordpress.conf` to `/home/dokku/<application>/nginx.conf.d/wordpress.conf` and restart nginx.
5. Deploy and profit.

You should set the following environment variables:
{'fraction_non_alphanumeric': 0.1292413267251239, 'fraction_numerical': 0.006862371330537552, 'mean_word_length': 3.232258064516129, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5226734', 'n_tokens_mistral': 864, 'n_tokens_neox': 834, 'n_words': 244}