Contents
How to execute a command using pantheon Drush?
Once the Pantheon Drush aliases have been copied, verify that the site aliases are available by listing every site alias known to Drush: Once you see the target site in the list of site aliases, you can execute a command on any remote site listed.
Is there a command line utility for Drush?
Refer to Drush’s install documentation for details on installing Drush locally. Drush-savvy developers should also install and utilize Terminus, a command-line interface that allows you to control your Pantheon account and sites. Virtually anything you can do in the Dashboard, you can script with Terminus.
How to run terminus Drush instead of Drush?
For example, you can run terminus drush . — cc drush instead of drush @pantheon.SITENAME.dev cc drush. For details on managing remote and local Drush versions, see Managing Drush Versions on Pantheon.
How to add a Drush command to Drupal?
While we have the full spectrum of Drush core already available for your use, you may want to add a command that you regularly use; for instance, Drush Search and Replace (sar). Put the site in Git mode. Clone locally. Create a drush folder in the Drupal root. Add the sar Drush command to the Drush folder. Commit drush/sar.
How to manage Drupal sites with terminus and Drush?
For more information, see Managing Drupal Sites with Terminus and Drush. For example, you can run terminus drush . — cc drush instead of drush @pantheon.SITENAME.dev cc drush. For details on managing remote and local Drush versions, see Managing Drush Versions on Pantheon.
What is the command line interface for Drupal?
Drush is a command-line interface for Drupal that provides a wide set of utilities for administering and maintaining your site. Drush commands require a settings.php file, and it’s a best practice to have one. Drupal 8 sites come with a bundled settings.php file out of the box.
Is there a Drush command for Drupal 8?
The command drush cache:rebuild for Drupal 8 serves the same function that registry rebuild does for older versions of Drupal. The drush sql-cli and drush sql-connect commands are not supported on Pantheon. For security reasons, the SQL database is not directly accessible from your local machine. You can, however, use Terminus as follows: