Bobcares

wesupport

CLIENT AREACall Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Install Drush on Drupal 8 and fix common installation errors

by | Feb 5, 2021

Wondering how to install Drush on Drupal 8 and fix common installation errors? We can help you.

A free & open-source CMS to create & manage many websites, the effective use of Drupal 8 requires an interactive shell interface like Drush is important.

It’s a very powerful tool that performs various tasks using commands in the terminal. However, installing Drush in Drupal 8 is quite tricky & requires good knowledge.

As part of our Server Management Services, we assist our clients with several Drupal queries.

Today, we’ll see how our Support Engineers set up “Drupal 8 install Drush” & fix the related issues.

 

What is Drush?

The name Drush stands for DRUpal SHell. It’s a command-line utility to communicate with Drupal CMS.

Drupal 8 uses Drush to manage &

  • Detect errors and fix them.
  • Bypass using the interface when the Drupal backend is unavailable.
  • Do regular maintenance and updates.

For users who need speed & flexible workflow, Drush allows them to run scripts from the command line & manages Drupal.

 

How to Install Drush on Drupal 8 and fix common installation errors

Since it is a command-line interface, and easy to process, the Drush scripting interface primarily works on the command line.

Moving ahead, let’s see how our Support Engineers install Drush in Drupal 8.

  1. First, we login into the server using SSH.
    ssh [email protected] -p 22
  2. Then, we change the directory to the user’s home directory.
    cd
  3. Next, we download the latest version of Drush using the following command.
    wget https://ftp.drupal.org/files/projects/drush-8.x-6.0-rc4.tar.gz
  4. Next, we extract the archive file like this.
    tar zxvf drush-8.x-6.0-rc4.tar.gz
  5. Finally, we run the command to clear the Drupal caches.
    drush cc all

The installation process is complete. Now, the user can use the Drush command easily.

 

Troubleshooting common Drush on Drupal 8 installation errors

From our experience in managing servers, we often see errors reported by customers while installing Drush in Drupal 8.

Let’s take a closer look at the causes & how our Support Engineers fix them.

 

  • Incompatible Drush version

Recently, one of our customers after installing Drush in Drupal 8 tried to update Drupal modules with the command drush ups. However, it resulted in an error like this.

Command pm-updatestatus needs a higher bootstrap level to run - you  [error]
will need to invoke drush from a more functional Drupal environment
to run this command.

In order to solve this error, our Support Engineers performed the following steps:

  1. Initially, we check the status by running the following command.
    drush status
  2. By analyzing we found that the Drush version was 8.0.3. Generally, Drupal 8 supports higher versions of Drush 8.1.
  3. Then we remove & install the latest version of Drush.
    wget https://github.com/drush-ops/drush/releases/download/8.1.3/drush.phar
  4. Next, we run the PHP file to verify the status
    /usr/local/php5.5/bin/php drush.phar status
  5. Finally, we ensure the correct version of Drush is installed by running this command.
    drush version

That fixed the error & the user could run the Drush command without any failure.

  • PHP issue

Similarly, even after installing Drush properly, we may face issues with the site due to a lower value in the PHP parameter.

We may also receive an error on the website indicating that the memory limit has been reached & it results like this:

PHP Fatal error: Allowed memory size of ### bytes exhausted

PHP allows a default amount of memory to process a website. Sometimes, a website needs more than the default amount of memory.

To get around this error, our Support Engineers increased the memory limits.

  1. Initially, we open the site’s configuration file.
    vi /sites/default/settings.php
  2. Then, we locate the line memory limit and raise the value to 500Ms.
    ini_set('memory_limit','500M');
  3. Finally, we save the file to reflect the changes made.

That’s how we fixed the problem with Drush in Drupal 8.

[Having trouble with Drush in Drupal 8? We’ll fix it for you.]

 

Conclusion

In short, Drush is a command-line utility to manage Drupal CMS. Today, we saw how our Support Engineers installed Drush in Drupal 8 and fixed the related issues.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Reviews

Categories

Tags