Ready to watch this entire course?
Become a member and get unlimited access to the entire skills library of over 4,900 courses, including more Developer and personalized recommendations.Start Your Free Trial Now
- View Offline
The course describes how to manage users, download and install modules and themes, archive and restore your entire site, and employ site variables for fast, full control over your Drupal sites. Plus, discover how to script an entire Drupal site installation with and without site profiles.
- What is Drush?
- Installing the prerequisite files
- Installing Drush with PEAR, manually, and just for Windows
- Installing Drupal sites
- Managing themes
- Controlling user access
- Controlling cache and cron
- Reading logs
- Updating modules
Skill Level Intermediate
This section installing the prerequisites is intended for Linux and Mac users. Windows users do not need to do this and should skip to the Windows installation segment. Before I start installation the first step I need to take is to ensure that the prerequisites are installed. Drush leverages a gnu Wget, a free and open source software package, for retrieving files. And Unzip, a mechanism for extracting archives. Without them Drush just won't work properly, so these prerequisites need to be installed. Most hosting environments and operating systems will already have both these commands installed. Open a terminal and connect to your development environment. I'll first demonstrate on my Linux virtual server, verify that Unzip is installed. To verify, type the following: unzip. If you do not see help listing then Unzip needs to be installed. If the command line environment is Linux then Unzip can be installed using the package manager. For example, with Ubuntu and Debian systems use the command "sudo apt-get install unzip". On CentOS and other systems using the yum package manager use the command "sudo yum install unzip". When complete verify that Unzip is installed. Next, determine whether or not Wget is installed. To do that just type "wget", if it is installed a simple error stating that no URL was given will be shown. If this error from the Wget is shown then no further work is required and you can skip to the next segment. If Wget is not installed then it'll need to be installed before Drush can be used. If the environments that will be used for Drush is a third party shared host that does not provide you privileges to install programs, please contact the host and request that Wget be made available. Similar to Unzip, Wget can be installed using the package manager on Linux systems. Ubuntu and Debian systems can use the command "sudo apt-get install wget". On CentOS and the other systems using the yum package manager use the command "sudo yum install wget". Then verify that the Wget has been installed by typing "wget"; I'm going to exit out here and clear. If you are using Mac OS X Lion or Mountain Lion there is a strong possibility that you do not have Wget installed. To do so it'll need to be compiled and installed as there is no officially recommended binary available. This will take some additional steps, but I'll demonstrate them. To install Wget it must be compiled which on a Mac requires either Xcode 4 or Xcode 4 command-line tools to be installed. If you already have Xcode 4 installed, you do not need to explicitly install the command-line tools. If you don't have Xcode 4 installed visit developer.apple.com/downloads and download the current version of the command-line tools for Xcode 4 your operating system. Once these tools are installed installation can continue. First, I will download Wget directly from the home page using the cURL command-line utility which comes installed with Mac OS X. From the command-line enter the following command: curl Space -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz. Next, decompressed the downloaded files using the tar archive utility, "tar Space -xzf", then the name of the file; change directory to the decompressed files. Before compilation a configuration step is needed, only one option is required specifying that SSL support will be handled with open SSL, meaning files can be downloaded from secure sites. So type: ./configure --with-ssl=openssl. Once the configuration is complete build the source by typing "make". This will take a minute or two. When compilation is been completed install the file into the default location user local bin, so type "sudo make install", it will ask me for my password. Following installation, verify that the Wget is installed, wget. Now that the-based dependencies of Drush have been fulfilled I can install Drush itself.