Get Drush command line support for CiviCRM

Thank you for blogging on civicrm.org! Check out the blog policy for more tips on how to better engage with the community.
Publié
2022-01-21 10:04
Written by
Anonyme (non vérifié) - member of the CiviCRM community - view blog guidelines

Using Drush with Drupal is standard practice for most developers, but since CiviCRM support was removed, many find themselves having to switch between separate command-line tools for each environment.

Seeing a need for continued Drush support in CiviCRM, Skvare’s developers released the CiviCRM Drush module for Drupal 8 and Drupal 9. Just as with Drupal, this module allows developers to support CiviCRM through a single command-line tool and continue previously established workflows. Edit media Image

Once installed and configured, the CiviCRM Drush module supports many commonly used commands:

civicrm:api (cvapi)CLI access to CiviCRM APIs.
civicrm:db-validateValid CiviCRM Database.
civicrm:disable-debugDisable CiviCRM Debugging.
civicrm:enable-debugEnable CiviCRM Debugging.
civicrm:ext-disable (ced)Disable a CiviCRM extension.
civicrm:ext-install (cei)Install a CiviCRM extension.
civicrm:ext-list (celList of CiviCRM extensions enabled.
civicrm:ext-uninstall (ceui)Uninstall a CiviCRM extension.
civicrm:member-recordsRun the CiviMember UpdateMembershipRecord cron (civicrm-member-records).
civicrm:process-mail-queueProcess pending CiviMail mailing jobs.
civicrm:rest (cvrRest interface for accessing CiviCRM APIs.
civicrm:restoreRestore CiviCRM codebase and database back from the specified backup dir.
civicrm:route-rebuildAdds a route rebuild option for CiviCRM.
civicrm:sql-cli (cvsqlc)Open a SQL command-line interface using CiviCRM's credentials.
civicrm:sql-confPrint CiviCRM database connection details.
civicrm:sql-connectA string for connecting to the CiviCRM DB.
civicrm:sql-dumpExports the CiviCRM DB as SQL using mysqldump.
civicrm:sql-queryExecute a query against the CiviCRM database.
civicrm:update-cfg (cvupcfg)Update config_backend to correct config settings.
civicrm:upgrade (cvup)Replace CiviCRM codebase with new specified tarfile and upgrade database.
civicrm:upgrade-db (cvupdb)Execute the civicrm/upgrade?reset=1 process from the command line.

With Drush for Drupal and CiviCRM Drush, developers can continue to use the same command-line interface for both environments.

Learn more about how Skvare’s team of Drupal and CiviCRM experts help organizations better deliver on their missions when their technology does more.

Filed under