Loading...


Related Products


Date Published: February 28, 2022

Troubleshooting Drush error : "Command XXXXX needs a higher bootstrap level to run"

Issue

When I run a Drush command it gives me an error with the message "needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command".

An example of the full message is:

Command updatedb-status needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.      [error]
The drush command 'updatedb:status' could not be executed.                                                                                                        [error]

Resolution

There are a number of ways that can be used to resolve this:

1. Run the command under the docroot directory of the application.

Normally drush assumes that the directory that you are running the command from is at the root directory or a sub directory below of your application. By running the drush command under the docroot, drush will run the command correctly.

An example of this is running the drush updatedb:status command:

example@staging-2924:/var/www/html/example.dev/docroot$ drush updatedb:status
 [success] No database updates required.

2. Use the --root option for Drush.

You can pa the --root or -r parameter to drush to tell it which docroot you want to run the command against.

 An example of this is running the drush updatedb:status command:

example@staging-2924:~$ drush --root=/var/www/html/example.dev/docroot updatedb:status
 [success] No database updates required.
example@staging-2924:~$ drush -r /var/www/html/example.dev/docroot updatedb:status
 [success] No database updates required.

3. Use the drush alias

You can use the alias for the drush command which will have the docroot details configured. You can even use the --root option as part of the alias to be sure.

 An example of this is running the drush updatedb:status command:

example@staging-2924:~$ drush @example.dev updatedb:status
 [success] No database updates required.
example@staging-2924:~$ drush @example.dev --root=/var/www/html/example.dev/docroot updatedb:status
 [success] No database updates required.

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation