Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Before You Begin Installing Drupal

0 (0 Likes / 0 Dislikes)
[This series based on: Using Drupal - 2nd Edition, by Angela Byron and Addison Berry, with Bruno De Bondt] [] [Drupalize.Me] [Using Drupal - Installing and Upgrading Drupal - Before You Begin Installing Drupal] [with Addison Berry] [♪ music ♪] In this short series, we're going to take a look at the fundamentals of working with Drupal, which is to get it installed and then keeping it up to date. We'll actually walk through the installation process, and then we'll look at how you can know if your site needs to be kept up to date and then how to do that, both for core and contrib. In this lesson, to get things started, we're going to get ourselves ready for installation, by going through a few steps to prepare for that. The first and most important one is gathering our requirements, making sure that we actually have all the requirements in place in order for us to do the installation. This is mostly checking things on our web server to make sure that we have the right software on the server. After that, we'll actually need to download Drupal. We need to get that source code, and then once we have the source code, we're going to take a quick tour of the file and directory structure, just so you understand what it is that you're installing. So let's go ahead and get started by gathering the information and files that we need. So before we actually install Drupal, we want to make sure that we have our requirements in place. So let's start off by going to and looking at the requirements page for Drupal. You can go to as the URL, or if you just go to, you can navigate there by going to Documentation and then looking at the Installation Guide. The very first section of the Installation Guide is System Requirements. And what we'll see here is the basic stuff we need. So you need to have a web server somewhere where your site is going to live. You do need a minimum amount of disk space. This should be covered by most any server. It doesn't require a whole lot of actual physical disk space. The important pieces, though, here are these three: the web server, the database, and PHP. So for web server, you have to have some sort of web-server software. Apache is the most popular, and it's the one most widely used in the community. For database, you need to have—for Drupal 7, you're going to want MySQL 5 or higher, with PDO, which most of the time you will have that. And you can also use Postgres or SQLite. Those are not as widely supported, though. Most people in the community use MySQL or an equivalent of MySQL. And then the last thing is PHP. That's the code that is used to run Drupal. And so, again, for Drupal 7 specifically, we want to have PHP 5.25 or higher. Generally, people recommend using 5.3. 5.2 has actually been deprecated at this point, so most of your servers should be upgrading to a minimum of 5.3 anyway. But these are the three basic components you have to have on that web server that you're going to run Drupal on. Once you have a web server with those pieces in place, if you're using some—like a web host that is providing this for you— not uncommon—you need to make sure that you have your FTP or SSH information, because you're going to need to put the Drupal files onto the actual web server. So whatever you need to connect for that, you should have that information. Or if you're using a local host, you just need to know where on your local computer you would be putting those files for your web root. The other thing you need is database server credentials. So you need the username, password, and a database name so that Drupal can actually connect to the database. You're going to have to create a database for Drupal to use. So either someone will have created that for you already, and they can give you that username, password, and database connection information. Or you would need to create it yourself and then make sure you write down and remember that information. Drupal's installation process will not create a brand new database for you. You need to create an empty database, and then the Drupal installation process will fill the database for you as you proceed. And if you do want to have your own local—so you can install the web server on your local computer that's not necessarily run by a web host, so that you can play around and experiment with things. There are a couple of different options out there. So there's XAMP, which is cross-platform, so you can get that for Linux, Windows, and Mac. For Mac-specific, there is also MAMP, which is at And then there's also WampServer, which is for Windows, Apache, MySQL, PHP. The community as a whole uses the AMP stack, Apache, MySQL, and PHP, and that's the assumption that you'll be running with as you work through these lessons. For actually installing Drupal, we're going to grab that from as well. Now you should—if you're working through the Using Drupal series of lessons, you should be using the source code that we provide, and there's already a lesson on that in the Preface series, or the About the Using Drupal series, that shows you how to use the source code that we provide with the book. In this lesson, I'm going to walk through how you install brand new Drupal that's downloaded from, instead of the installation profile stuff that we've provided. So when you go to, there's a big Get Started with Drupal button. You can click on that, or you can also go to Download and Extend. But we'll just do the Get Started with Drupal. And you can see Download Drupal, and it will have the latest version, which right now, at the time of this lesson, is 7.22. I'll click that. And instead of actually starting a download, this takes me to the Drupal core project page on, and if I scroll down, you'll see, these are the downloads that are available to me, and I can read the release notes on it, etcetera. I can look at issues. But these are the download links right here. So there's a tarball, a tar.gz file, and a Zip file. Download whichever one you like or prefer or need for your operating system. But you want to download a copy of this, and then once you get that, you're going to need to put it into your web server, wherever your website is supposed to live. So if you are doing it on your local computer, then you need to put it into the right directory on your computer. And if you're using a web host, you need to make sure you SFTP or SSH, and put those files into the right place for the website to function. I'm going to go ahead and download this onto my local computer, because I have a local development environment here. And then we'll take a look at what we've downloaded. So now I'm going to switch over to where I've downloaded this file. And it's here, I got the Zip file. I'm going to go ahead and open that up, unzip it, whatever software you need to use in your operating system. And it creates this folder, Drupal-7.22. I can change the name of this folder. It's not going to hurt anything. So if I wanted to just change it to Drupal or D7 or Drupal7, whatever you want to name this folder is fine. If you are just using these files on a web root, you probably won't want this folder at all. You just want the contents of it. This is actually Drupal, all of these files here. The important pieces to be looking at here are the files that we need for installation and update, as well as the sites directory, which is a very important folder in your Drupal installation. So the install.php and update.php files are the two scripts that actually do the work of installing and updating, respectively. Because they're located in this top-level folder, this is called the Drupal root. So you can see we have install and update. This is your Drupal root folder, and that's how people will refer to it. You can access either of those directly in your browser by going to whatever the web address for your Drupal site is, slash, for instance, install.php or update.php. You can type it directly into the URL, and you'll go to that file and run the scripts there. In addition to those actual scripts that end with .php, there are two text files, one for each, install.txt and upgrade.txt, that have instructions and more information on what those scripts are used for. Now most first-time Drupal administrators are going to take a look at these directories and put contributed and custom modules and themes into the modules and themes directories. That makes sense. There's modules, there's themes, if I get a new one. You would think that would be where you would place them. They will actually work there, but it's really not a best practice. It's going to create a lot of problems, because if you overwrite those directories, when you do an update of Drupal, you could lose all of the stuff that you put in there. The best practice is to keep all of your site's specific contributed and custom code in the sites directory. So this directory here, sites. And unless you're using something called a multisite installation, which we'll look at in a couple of minutes, you should put all of your modules and themes inside directories inside sites. So I would go into my sites, all, and I have modules and themes here. And that's where I would actually put all of my contributed and custom modules and themes for my Drupal site, in that location. So this way it's easy; you can isolate the sites folder whenever you do an upgrade and not change anything else, and let Drupal core update everything it needs to without a risk of overwriting the files that you want to keep in there that are specific to your site. Now a minute ago, I referred to something called a multisite installation. And Drupal has the capacity to run multiple sites from one Drupal code base. So you can have one set of code, this code that we're looking at now. But you can actually run multiple websites with different domain names from just that one bit of source code. And in the Drupal world, we call that multisite. So actually the example websites that we have for are using this multisite feature to run, so that we have a domain name like They all are running from that same code base. We only have one set of code, and then each site has its own individual database. So the way that you would set that up— I'm not going to go into great detail, but I just want to give you some of the basics so that you understand what might be involved if you're interested in doing something like that. Because this is going to involve a little bit of web server configuration, in terms of you need to set things up for Apache to understand what it should be doing. So what you need to do is first let Apache or your web server know that whatever different domain names you want to use should point to this particular directory. So even if I have five different sites with five different domain names, they all need to point to just this one folder of Drupal. And I'll just show you a real quick example of what that looks like. Here is what we call the vhost file for You'll notice in the ServerAlias— so the server name itself is using But under ServerAlias, we have this with an asterisk in the front. So that means that anything that is a subdomain there of usingdrupal— I could list out each individual one that we're using. Since we have multiple, I just put an asterisk as a wildcard, say anything with a subdomain should also point to this same directory that the main domain name is pointing at. And that directory is this document root. And so this is where it's living on my server. So you need to set up your virtual host to make sure that the web server points to the directory that you need, and then all you need to do in your Drupal installation is have—each of those sites gets its own little directory inside of your sites folder. So let's take a look at what that looks like. So here is my Drupal root on the site. And you can see, so we have the all, which has modules and themes like we were looking at, and if you just have a single site, that's all you really need to use, and the default is where your settings.php file is. But then you can see I have—for each of our subdomains, there's a different folder, and each of these can have its own files settings, and it can have its own modules and themes folders, if I want to limit what it can choose from only there. So there's a lot more information about multisite on, and so you can investigate that more if you want to. It is a capability that Drupal has. Honestly, there aren't a whole lot of use cases where it makes a lot of sense to use it, but you should know that it's there, because if you do need it, it's a really, really handy thing to be able to implement. Also, in Drupal 7, there's now an Advanced feature that allows you to create aliases for multisite installation directories. So this would let you map one or more arbitrary site names that would be used in a URL to a specific configuration folder. So hopefully you have a sense of the requirements that you need, and make sure that you get your basic web server requirements set up. We've downloaded Drupal and looked at the important files and folders that we'll mostly be working with when we're working with Drupal. And then we had a quick review of a pretty nifty feature called multisite, which most of the time you won't need, but if you do need it, it's a very handy thing to know about. So now that we have everything in place, we're ready to actually begin installation of Drupal. [Drupalize.Me] [Based on the book Using Drupal, 2nd Edition, by Angela Byron, Addison Berry, and Bruno de Bondt] [Excerpts from the book used with permission of O'Reilly Media, Inc., which owns or controls all rights to publish and sell the same] [O'Reilly®]

Video Details

Duration: 15 minutes and 15 seconds
Country: United States
Language: English
License: All rights reserved
Genre: None
Views: 30
Posted by: drupalizeme on Jul 17, 2013

Prior to installing Drupal, it’s important to make sure that you can actually do so, and understand a bit about how Drupal is structured. This lesson provides a checklist of Drupal’s requirements, and also highlights important things in the Drupal file structure that are worth knowing before diving into the installation process. We also explain and take a quick look at how you can use Drupal to run multiple sites from the code base, known in Drupal as a multisite installation.

Caption and Translate

    Sign In/Register for Dotsub to translate this video.