This section provides information on script type and location, as well as how to install specific scripts.
Quicksilver currently supports
webphp scripting, which runs a PHP script through the same runtime environment as the website. PHP scripts are subject to the same limits as any code on the platform, such as timeouts. PHP scripts cannot be batched, and run continuously and sequentially. Each command executes after the previous command has finished or timed out.
We recommend that you set the
true and that you create a dedicated directory under the docroot (for example,
web/private/scripts). This tracks files by instructing Quicksilver to look for the files inside the
web folder. If your site uses this nested docroot setting, the scripts directory must be located in the
web subdirectory of your site's code repository (for example,
If your site uses a nested docroot, the script paths in your
pantheon.yml file should not include the
web/ path prefix. Scripts in your
pantheon.yml file should match one of the following path examples:
Even though the
script section in the
pantheon.yml file does not include the
web folder, the file is located inside
web. For example, if this line is set in the
The file must be located in:
You can use Terminus to install Quicksilver Composer scripts if you have a Composer-managed site. The sections below provide links to Pantheon-maintained repositories with install scripts.
Use the Pantheon Cloudflare Cache repository to clear your Cloudflare cache.
Always clear your CDN cache using the
after timing option to avoid requests re-caching stale content. Caches should generally be cleared "bottom up".
Use the Pantheon Quicksilver Debugging repository to explore Quicksilver as a workflow improvement tool.
The Pantheon Drush CMI repository provides steps on how to integrate Drush commands into your Quicksilver operations. This allows you to import configuration changes from
The Pantheon Drush Revert Features repository provides information on using Drush commands to revert specific features.
The Pantheon Enable Development Module repository provides steps on how to use Drush within a Quicksilver script.
Use the Pantheon Generate Development Content repository to integrate Drush devel generate commands into your Quicksilver operations. This allows you to generate development content on each database clone operation.
Use the Pantheon WP-CFM Import repository to automatically import WP-CFM configuration settings into a cloned database. This is useful for development environments that have slightly different settings than the production environment.
Only use WP-CFM to write changes to code in Dev and Multidev environments, where the code base is writable. Cloning databases between environments before saving WP-CFM bundles can result in loss of data.
Use the Pantheon New Relic Apdex T Values repository to set custom T values for Multidev environments. Each environment will use the default values of 0.5 and 7 for your server and browser, respectively, if you don't set a custom value.
Use the Pantheon New Relic Deploy Markers repository to automatically log changes to your site into New Relic's Deployments page. This can be useful for keeping track of performance improvements.
Use the Pantheon Search and Replace URLs on WordPress Sites repository to automatically find and replace URLs in the database of a WordPress website. This is helpful for sites that have multiple domains in an environment.
Your script may require tokens, passwords, or other information that should be protected. These values should be stored securely. You can do this with a third-party key management service like Lockr.
You can also use your site's private files path to store values securely. Note that the Site Dashboard function to copy files from one environment to another will also overwrite the private files path when storing keys for Quicksilver scripts in the private files path.
Install the Terminus Secrets Plugin to manage secret data in JSON files in your site's private files path.
This allows you to write and remove key values. The code example below shows you how to write a value to a key:
terminus secrets:set site.env key value
Use the Pantheon Slack Integration repository to integrate Slack notifications from your Pantheon project using Quicksilver. This integration overview also provides information on how to manage API keys outside of your site repository.
Use the Pantheon URL Checker repository to check specific URLs after a live deployment. This script also notifies you of failures by email.
Use the Pantheon Quicksilver Webhooks repository to post workflow data to an external URL for a generic Webhook implementation.
Use the Pantheon WP Solr Index repository when you create a new WordPress Multidev environment. New WordPress Multidevs clone the code, files, and database, but not the Solr instance. This script re-indexes Solr using WP-CLI and the Solr Power WordPress plugin.