Skip to content

Commit

Permalink
Make mu-plugin for Composer and add instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
polevaultweb committed Mar 5, 2019
1 parent 0b287b9 commit 0b9cabb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ This must-use plugin adds page cache purging functionality to your WordPress sit

## Install

Copy the contents of the `src` directory to `/wp-content/mu-plugins`, giving a directory structure like so:
You can install the mu-plugin with Composer:

```bash
composer require deliciousbrains/spinupwp-mu-plugin
```

Or manually by downloading the zip and then copying the contents of the `src` directory to `/wp-content/mu-plugins`, giving a directory structure like so:

```
├── wp-content
Expand All @@ -15,7 +21,7 @@ Copy the contents of the `src` directory to `/wp-content/mu-plugins`, giving a d
└── themes
```

Add the following constants to your `wp-config.php`:
Finally add the following constants to your `wp-config.php`:

```
define( 'WP_CACHE_KEY_SALT', '{DOMAIN}' );
Expand Down
23 changes: 14 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"name": "deliciousbrains/spinupwp-mu-plugin",
"description": "WordPress must-use plugin for sites hosted with SpinupWP",
"license": "GPLv2",
"authors": [
{
"name": "Delicious Brains",
"email": "[email protected]"
}
]
"name": "deliciousbrains/spinupwp-mu-plugin",
"description": "WordPress must-use plugin for sites hosted with SpinupWP",
"license": "GPLv2",
"authors": [
{
"name": "Delicious Brains",
"email": "[email protected]"
}
],
"type": "wordpress-muplugin",
"require": {
"composer/installers": "~1.0",
"lkwdwrd/wp-muplugin-loader": "~1.0.0"
}
}

0 comments on commit 0b9cabb

Please sign in to comment.