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.
Setting up this example is easy:
- Add the wp_toggle_dev_plugins.php to the
private/scriptsdirectory of your code repository.
- Add a Quicksilver operation to your
pantheon.ymlto fire the script a deploy.
- Test a deploy out!
Optionally, you may want to use the
terminus workflow:watch command to get immediate debugging feedback.
Here's an example of what your
pantheon.yml would look like if this were the only Quicksilver operation you wanted to use:
api_version: 1 workflows: deploy: after: # Toggle developer plugins - type: webphp description: Toggle developer plugins script: private/scripts/wp_toggle_dev_plugins.php