From 880da8f06cab41ac25839eab72a146b1237cf2c6 Mon Sep 17 00:00:00 2001 From: Adam Edgmond Date: Tue, 23 Oct 2018 05:30:38 -0700 Subject: [PATCH] add wp_toggle_dev_plugins example --- wp_toggle_dev_plugins/README.md | 29 +++++++++++++++++++ .../wp_toggle_dev_plugins.php | 20 +++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 wp_toggle_dev_plugins/README.md create mode 100644 wp_toggle_dev_plugins/wp_toggle_dev_plugins.php diff --git a/wp_toggle_dev_plugins/README.md b/wp_toggle_dev_plugins/README.md new file mode 100644 index 0000000..cd18199 --- /dev/null +++ b/wp_toggle_dev_plugins/README.md @@ -0,0 +1,29 @@ +# Toggle Developer Plugins on WordPress Sites # + +This example will show how you can automatically activate and deactivate plugins based on environment on deploy. This will ease development and potentially improve performance on Live. + +## Instructions ## + +Setting up this example is easy: + +1. Add the wp_toggle_dev_plugins.php to the `private/scripts` directory of your code repository. +2. Add a Quicksilver operation to your `pantheon.yml` to fire the script a deploy. +3. Test a deploy out! + +Optionally, you may want to use the `terminus workflow:watch` command to get immediate debugging feedback. + +### Example `pantheon.yml` ### + +Here's an example of what your `pantheon.yml` would look like if this were the only Quicksilver operation you wanted to use: + +```yaml +api_version: 1 + +workflows: + deploy: + after: + # Toggle developer plugins + - type: webphp + description: Toggle developer plugins + script: private/scripts/wp_toggle_dev_plugins.php +``` diff --git a/wp_toggle_dev_plugins/wp_toggle_dev_plugins.php b/wp_toggle_dev_plugins/wp_toggle_dev_plugins.php new file mode 100644 index 0000000..2f5968a --- /dev/null +++ b/wp_toggle_dev_plugins/wp_toggle_dev_plugins.php @@ -0,0 +1,20 @@ +