Book Image

Drush User's Guide

By : Juan Pablo Novillo Requena
Book Image

Drush User's Guide

By: Juan Pablo Novillo Requena

Overview of this book

<p>Drush is a command line interface for Drupal. Most of the tasks for building and maintaining a website are repetitive and involve filling in forms on administration pages. The majority of these tasks can be achieved with a single Drush command, shortening the development and maintenance time of a project drastically.</p> <p><em>Drush User's Guide</em> will allow you to be more productive and efficient in building and maintaining your Drupal sites through the command line. You will learn to install Drush on different platforms, and manage and configure your Drupal site by learning how to use and create Drush commands.</p> <p>Become a Drush expert by exploring its command toolkit; customizing it to suit your needs, and extending it with contributed modules.</p> <p>The command line will allow you to download, enable and upgrade Drupal projects in seconds. Back up your files, code and data in one single file, clear the cache, interact with databases, and deploy sites to remote machines - all using simply the command line. Use Drush with your own commands or alter existing ones; and extend the toolkit with a long list of contributed modules.</p> <p><em>Drush User's Guide</em> has everything you need to extend your use of the command line to easily build and manage your Drupal sites.</p>
Table of Contents (10 chapters)

Configuring a site (variable-set and variable-get)


Once logged in as the administrator in our newly created site, it is time to configure its basic behavior. We could navigate through each of the configuration pages, choosing what best fits our purpose. However, there are some scenarios where you know which settings you want to set and do not want to go log in and go through each of the configuration pages, where they are located, to change them. For example, imagine that you have just downloaded a production database, and every time you do this you have to change a few settings to block unwanted reactions while working with the site (such as disabling SMTP e-mail submission). The commands variable-set, variable-get, and variable-delete allow you to configure, view, and delete Drupal configuration variables stored at the variable table.

Listing available variables

First of all, let's see what variables are already set in the variable table of our site's database:

$ cd /home/juampy/drupal...