Viewers: in countries Watching now:
This course teaches web site designers how to take their sites to the next level with a few advanced techniques and the free and open-source Drupal software. Author Tom Geller shows how to configure the most popular add-on modules; use *nix commands and an FTP program to manage a Drupal site on a web server; change its visual appearance using the latest graphical tools; automate and speed through common tasks with Drush; integrate with social media sites; and see how "supermodules" like Panels, Context, Rules, and Features open up new worlds of code-free development.
Drupal 7 Advanced Training was designed as a follow-up to Drupal 7 Essential Training and it also dovetails nicely with our other Drupal courses, such as Drupal 7 Reporting and Visualizing Data and Create Your First Online Store with Drupal Commerce.
Drupal can run on a variety of operating systems, but an overwhelming majority of the time your web host will be running on a UNIX-like operating system such as Linux. For the sake of convenience, I'll call all such operating systems UNIX, although technically that's not quite true. The primary way that you interact with UNIX is by typing command into what's commonly called the command-line interface. There's no dragging and dropping, no double clicking, and the command themselves can be kind of obscure. The good news is that you only need to know a few of them to maintain, update, and tweak your Drupal site.
A quick warning though: UNIX is extremely powerful. It's actually possible to wipe out everything you have with only a few quick commands. So I do recommend further study before you dive in. Here we go with the basics. The first thing that you'll need to do is to connect to your web host using a terminal program such as I have here on Mac OS. On the Mac, you'll find that inside the Applications folder, then inside Utilities, and then it's simply called Terminal. On Windows, you can use a third-party client such as PuTTY or OpenSSH, or type "telnet" at the command line.
Click the Start menu and then search for SSH. Now let's talk about how you tell the computer to do things. Commands in UNIX generally follow the pattern, command; followed by options; followed by arguments. Let's take a look at some examples. ls means list everything that's in the directory that you're currently looking at. It's basically like double-clicking a folder and seeing all the files inside it. It doesn't require any options. However, you can add them. For example, ls -al means list, but show all files in a long form.
Some commands, including ls, can also include arguments. For example, ls -al sites/ means list everything that's in the sites folder in a long format and show all files, including the invisible ones. Some commands take more than one argument. For example, the copy command, cp. The one that I have here is copy recursively, cp -R, that is, copy this directory and everything below it from temps/sites to something new called website. And this continues to go on, so some commands can actually be quite complicated.
You see this tar command here, which is a stuffing and unstuffing program, which has several different parts to it. It's actually just the command, followed by the options, followed by several arguments. One thing that's confusing about UNIX is that it often uses single characters as shorthands. Here's a list. It's not a complete list, but it shows you the most important ones. A period (.) means the Current directory. Also you'll sometimes see it at the beginning of hidden files, such as .htaccess; that particular file shows up a lot when you're working with Drupal. Two periods (..) means go one level up.
It's like clicking that button in Windows that shows a little folder with an arrow coming out of it. A tilde (~) is your home directory. A slash (/) shows the directory structure. So for example, sites/all, means the all folder inside the sites folder. Finally, we have this asterisk (*), which is the wild card. It means do whatever you want to do, to everything. Here's a short list of the commands you'll use most often. Rather than talk through them all, I recommend you stop the video at this point and keep its window open while you're getting used to them.
You'll notice as you look at the list that they are kind of obscure. I mean, what is cd, what does that have to do with moving from one place to another? It's because it's shorthand for the original meaning of it, which is change directory. So sometimes it's easier to remember these commands if you know sort of where they came from. But enough talk, the best way to explain is to do, so I'm going to perform a quick session on my web host right now to start installing Drupal. The first thing that I do is I connect to my web host. Right now, I'm just looking at the Terminal on my desktop machine, so ssh, my username@ the domain.
The first time you do this, it may ask you whether you want to take a key; that is, so it knows that it's your computer. Just say yes if that happens. I enter my password, and I'm in. One thing that you'll notice is this prompt; that is, the thing that is before everything that you type has changed. It tells you a little bit about where you are. In this case, I'm user tgeller on web41 on my web host, whereas before I was simply booth-06-mac. First thing I'm going to do is to take a look at that list command, ls. That shows me everything that's in this folder.
I can see where I am with pwd, which believe it or not, originally stood for Place Where I Dwell. I can make a directory, mkdir lynda, and then if I ls again, there it is. If I do ls -al, it shows all files, including the hidden ones in a long format. This is what it looks like. You'll notice that it has some of these dot (.) files we didn't see before. That's what the "a" does. I'm going to descend into that lynda directory by doing cd lynda. If I ls again, I see there's nothing in it.
Okay, now we're going to go to drupal. org and get a copy of Drupal itself. That's at drupal.org/project/drupal. Scroll down. I'm going to Copy the Link right here, go back, and use the wget command, and then paste the link that I just copied. It shows a progress bar, and if I type ls, we see that there it is. Now I'll use the tar command. You'll notice I'm using those options. These ones are the ones that I always use to uncompress something from drupal.org. The x is for extract, the z is for a ZIP file, v means verbose, and the f means I'm about to give the file name.
Again, as you learn more about UNIX, you'll get to know these options a little bit better. You'll notice I only typed a few letters of the file name and then hit the Tab key. In many versions of UNIX that completes whatever is there. If there's any ambiguity; if for example, there was more than one file that began with dru; it would give you the different choices that are available. But that's all I have, so we extract. I list again, and now I see both the files I downloaded, the gz, and the uncompressed folder. I'll get rid of the gz by rm *.gz.
And because there's only one .gz file in that folder, that's the only one it gets rid of, even though the star (*) means get rid of all of them. List again, yep, it worked. To send into that drupal folder, see what's in there. You'll find yourself doing this a lot. You go to a place, see what's there, move it, go to another place, and so on. I'm going to move it all up one level. Now if I list again, I see that it moved everything, except the dot (.) files. I have to move those manually. So, .get, up one. Move .htaccess up one.
Now it's empty. I can go up one level and remove the directory, drupal. Now when I list again, Drupal has been downloaded and is ready to install. I know that was a lot of things to see all at once, but I just want to give you a sense of what a typical UNIX session is like. You'll find yourself moving around a lot. The cp command for copy, mv for move, ls for list, these are things that you use all the time. The last thing I want to show you is how to get help with the man command, which stands for manual.
Let's say I want to see how to copy; man cp gives me all of the details I need, and there are quite a few. You can go from one page to another by pressing the spacebar, and as you can see it has a lot of options. A few other useful commands are b, which brings you back up a page; h, which gives you help for using this reader; and then q, which gets you out of the Help command entirely. For complicated commands, for example, for the tar command, I recommend that you take a look for examples, because as you can see, there are far too many switches here to know just from learning the first time.
So down here at the bottom, you have all of these examples which explain things much more quickly than if you were to look through all of those options. Now I'll be honest, I'm personally not all that adapted to UNIX and I often find myself turning to experts for help. I'm very grateful for the lynda.com course, UNIX for Mac OS X Users and I recommend it to anyone who wants to dive in deeper. You might also be able to run your site just fine without ever having to use the command-line interface; for example, by using a graphical FTP program. But if you do need to, what you've seen here will help you get off to a good start.
Finally, if you find that these commands aren't working for you, contact your web host. They might have things set up differently from what you saw here.
There are currently no FAQs about Drupal 7 Advanced Training.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.