Drush is a command-line shell for Drupal that enables you to perform many website maintenance tasks and administrative tasks from the terminal instead of using the Drupal administrative interface. Drush aliases allow you to run Drush commands on your local server but actually, the command executes on a remote server. This is a real-time saver while working locally and you want to do something on the remote server.
Technical Solution | 3 min read
This article is about a few drush commands as well as Linux commands that helped ease my work at times while working on remote servers. Mostly while updating or upgrading. The need for bulk operations in drush is often never met except using complex Linux commands often involving 'sed'. Operations like disable all non-core modules, enable the disabled modules from a list, create a list of all core and non-core modules in use and so on.
Technical Solution | 3 min read
I was using Domain Access and Domain Variable modules in my project. I have a lot of domain specific variables which have different values on production, staging and development environments. It takes me a lot of time to set these variables with the corresponding staging and development values each time when I reset these environments. So I was thinking of creating a drush command to update all these configuration variables in single step and I did it.
Can you imagine how it will be to manage Drupal sites without Drush. We may face one issue when Drupal 8 release coming up. Drupal 8 needs the all new version of Drush, and it won't be compatible with older Drupal version 6 and so. Drush version 5 is used to Drupal 6, drupal 8 requires drush of version 8, or else if you have scripts for Drush developed for version 6 or 7 will not work with the latest version of Drush. In this article lets see how we could experiment switching between the Drush versions.
As part of Drupal development project, we always use drush commands. Drush or Drupal shell refers to a command-line shell and scripting interface for Drupal. Drush enables developers to effectively manage and maintain their Drupal websites from the server command line. A few frequently used commands are listed below.
Drupal Technical | 3 min read
Imagine if your Drupal site has more than 30-50 modules and you wanted to update them all or you want clear all Drupal cache. If you do it manually just by unzipping and run update.php or just click the clear cache it may takes more time. Hence if you can do this all process in one single command it will be easier for a developer. Here we can use drush commands to do all work with a single command and in few seconds.
Drupal Technical | 4 min read
The radical changes that Drupal 8 brought forward have been reflected in Drush 7 as well. Drush 7 now uses composer to download its dependencies. Before installing Drupal 8 you must make sure that Drush 7 has been installed. This is because Drupal 8 can be downloaded and installed using Drush like in the previous versions of Drush and also, Drupal 8 only supports Drush 7. Unlike earlier versions, Drush 7 cannot be installed using "sudo apt-get install drush" nor can it be updated by running "drush self-update" because that will result in updating to Drush 6 and no more. Hence the purpose of this article. Drush is a powerful tool to manage routine tasks in a Drupal site. Downloading, installing or enabling modules, running cron and much more can be accomplished using Drush. This is why its important to have Drush 7 before a Drupal 8 installation. Drupal 8 requires minimum version of PHP 5.4. Apache requirements haven't been mentioned, but I recommend apache2.4. After this we can begin installing Drush 7. Installing Composer
In a Drupal site, I was working on, I found that many of the modules were unused. Their presence was increasing the size of the site and consuming time when searching for useful info. So I thought of removing these modules.It makes our job a lot easier if we are using Drush Read on to know how to remove unused modules in a Drupal site with the help Drush.
Drupal Technical | 1 min read
What do you do if you have to take your Drupal site into maintenance mode from the command line? Well you can do this easily if you have drush set up on your server. With drush you can do quite a lot powerful drupal administration tasks right from the command line. In Drupal 6 The following drush command will take your Drupal site offline drush vset site_offline 1 The following drush command will take your Drupal site back online drush vdel site_offline In Drupal 7
As the World wide web is starting to resemble the wild wild west, you have to ensure that your Drupal site is always up to date. If you are ignoring the security updates of Drupal, then you are simply making your Drupal site vulnerable to the worst enemy of all - Negligence. Updating a Drupal site requires time and effort which is why most people ignore it. Here is a quick way to update your Drupal site using Drush and Hacked module.