PHPackages                             backdrop/drush - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. backdrop/drush

ActiveBackdrop-drush[CLI &amp; Console](/categories/cli)

backdrop/drush
==============

This project allows you to use Drush with Backdrop CMS. Drush is a command-line tool for manipulating content management systems.

1.4.1(2y ago)1417318[46 issues](https://github.com/backdrop-contrib/backdrop-drush-extension/issues)[1 PRs](https://github.com/backdrop-contrib/backdrop-drush-extension/pulls)GPL-2.0+PHPCI failing

Since Jun 4Pushed 2y ago17 watchersCompare

[ Source](https://github.com/backdrop-contrib/backdrop-drush-extension)[ Packagist](https://packagist.org/packages/backdrop/drush)[ RSS](/packages/backdrop-drush/feed)WikiDiscussions 1.x-1.x Synced 2d ago

READMEChangelog (10)Dependencies (3)Versions (22)Used By (0)

Drush Integration for Backdrop CMS
==================================

[](#drush-integration-for-backdrop-cms)

This project allows you to use [Drush 8](https://github.com/drush-ops/drush) with [Backdrop CMS](https://backdropcms.org). Drush is a command-line tool for manipulating content management systems.

**This project is deprecated. The [bee](https://github.com/backdrop-contrib/bee)project is the best way to interact with Backdrop via the CLI.** If you use the backdrop-drush extension on your Backdrop projects, PHP 7.4 is recommended, as drush 8 has some issues with PHP 8+. Drush 8 is also scheduled to become unsupported when Drupal 7 reaches end-of-life on January 15, 2025.

This integration is currently capable of executing the following commands:

- `drush dlb backdrop`: Download Backdrop CMS.
- `drush cc`: Clear individual or all caches in Backdrop.
- `drush uli`: Generate a one-time login link.
- `drush upwd`: Update the password for a selected user.
- `drush st` : Check the status of a Backdrop site; bootstrap, database connection etc.
- `drush cron`: Run the regular interval commands in hook\_cron().
- `drush updb`: Run database updates through the Backdrop update.php script.

- `drush pml`: Show a list of available extensions (modules and themes).
- `drush dl`: Download and unpack contrib modules, themes, and layouts.
- `drush en`: Enable one or more extensions (modules or themes). Enable dependant extensions as well.
- `drush dis`: Disable one or more extensions (modules or themes). Disable dependant extensions as well.
- `drush pmu`: Uninstall one or more modules and their dependent modules.

- `drush bcex`: Export a Backdrop site configuration.
- `drush bcim`: Import Backdrop site configuration.
- `drush bp`: Generate boilerplate code for developers; \*.info and \*.module files.
- `drush sql-*`: MySQL connection commands, such as `sql-cli` or `sql-conf`.
- `drush scr`: Execute scripts with the Backdrop API.
- `drush ctl`: List the content types available on the site. (only for backdrush &gt;= 1.1.0)

To see a full list of available drush commands (not all of which will necessarily work with Backdrop CMS):

- `drush help`

To get additional information about a specific command

- `drush help `

There are many more commands that Drush may execute, but they need to be updated for use with Backdrop. Although some commands may have worked through Backdrop's compatibility layer, for now any untested (and possibly dangerous) commands are not allowed to be run within a Backdrop installation.

As an alternative to Drush, you may like to consider using [Backdrop Console](https://github.com/backdrop-contrib/b), which has been built from the ground-up specifically for Backdrop.

Installation
------------

[](#installation)

This project requires that you use the "8.x" branch of drush (). Neither older versions of drush nor the new 9.x or master branches will work with this extension.

There are a number of ways to install the Backdrop drush extension. All of them require the drush `8.x` upstream. The main two ways are to install globally or site local installs.

The main advantage to the global install is you install the Backdrop Drush Extension once it operates on all your Backdrop sites. The disadvantage is that it can effect how drush operates on Drupal sites (sometimes breaking some commands). We try our best to prevent that, but it has been known to happen.

The main advantage to site local installs is that you will not break your Drupal sites or other Backdrop sites. The main disadvantage is you need to install drush proper and backdrop drush once per site.

Install with Lando
------------------

[](#install-with-lando)

I primarily use [Lando](https://docs.devwithlando.io) to do my development and Lando comes with the Backdrop Drush Extension installed 'out of the box'. I recommend Lando to do local development in general and as a great way to isolate dev dependencies and tooling for Backdrop site development.

By default Lando will install the latest stable release of the Backdrop Drush extension, but you can point it at any git tag or commit hash. If you wish to live on the bleeding edge and run the Backdrop Drush extension from source you can use this example [.lando.yml](https://github.com/backdrop-contrib/backdrop-drush-extension/wiki/Contributing-code-to-the-Backdrop-drush-extension.)file.

Install as Site Local
---------------------

[](#install-as-site-local)

Download drush proper to your `BACKDROP_ROOT` (the place where your Backdrop code exists. The directory structure should loook something like this:

```
└─ $ ∴ ll
total 84
drwxrwxr-x 10 gff gff  4096 Jan 12 13:04 ./
