Example Lesson - Building Websites with Drupal 8

  • Lesson Notes
  • Assignment
  • Playlist
  • Transcript
Lesson Notes

You will need download Filezilla or another FTP program to do this week's lesson. (see the links below) If you have any questions, ask them in the class forum or during this week's live session.

Links from the video

Frequently Asked Questions

Do the lesson videos play on iPads and iPhones?

Yes, they work on both desktop/laptop computers and iOS devices.

How can I ask questions or get help?

You can ask questions about the lesson or get help with your assignment by posting to the class discussion forums and attending the weekly live lab sessions with the instructor. (online via webinar software)

Do I need to have my own website or hosting account to work on?

No, we will provide you with a hosting account to work with for the duration of the class. This way you can do the assignments without messing up your existing website. Working on our hosting system also ensures your experience matches what you see in the lessons and allows us to troubleshoot any hosting-related issues you may have.

Assignment

Over the duration of this course you’re going to be building an example Drupal site. The site will be a simple library catalog, which we’ll then transform into a book store when we get to the e-commerce portion of the class. Your first assignment towards this end is to set up a basic Drupal site.

Here’s an outline of what you need to do:

  • Download Drupal 8 and unzip it.
  • Upload the Drupal files via FTP to the www directory in your hosting account.
  • Login to your hosting account and create a database. (hosting login information can be found on the class page, under the Hosting tab)
  • Go to the URL for you site, and the Drupal installer should be shown.
  • Install Drupal, configure the superadmin username and password.
Playlist
Transcript
In this video, I'm going to show you how to install Drupal on your hosting accounts. I already have Drupal downloaded, from Drupal. org. I've unpacked it. I have the Drupal files here on my computer. I have a blank hosting account, you can see it back here. The site is empty. There is going to be three major steps to this process. The first step is, we're going to copy all the files from My Computer up to the web server. The second step is, we're going to create a database on the web server because you know that we need a database for Drupal to work, so we need to create one. Once we have those two things in place, we can go through the install process, and set all the Drupal configurations and get the site up and running. The first step will be to load the files from our computer, copy the files from our computer up to the web server. We can do that with FTP. I'm going to use FileZilla, and I'm going to use my FTP connection information. Yours will be different. When I connect to the server, I will see on the right-hand side, a list of files. These are the files on the server, you can see it says Remote Site up here, and it says Local Site. These are the files on my computer. If you don't see your Drupal files here, you may need to choose the correct directory. I launched this a little while ago, I was in the right directory, but you may need to type Downloads... Drupal... wherever you put it. You may need to click into it in this window here. You should see your Drupal files here, and you should see your files on the server here. So the first thing you want to do is on the server, double-click on public_html. public_html is the... that's the folder that all the files that we want to be visible on the website... they need to go in there. You can see that there's a cgi-bin directory, and you can see that's actually listed on my website, over here way on the left. This is the map - I've matched it up. Now, it's empty otherwise, but we knew that. So we're going to put the Drupal files up there. Make sure that you're copying the files at this level... you see how I can see a bunch of different files? I've got a core folder, module folder, themes folder... If you see just Drupal... don't drag the Drupal folder over there. It's not going to work. So what you need to do is select all the files from the root of the Drupal folder, and you can do that here in the left-hand window if you use the Shift key, so I'm holding down the Shift key right now. Oh, sorry, I should have... I skipped a step there. I'm going to click the first one, core, and I'm going to scroll down and I'm going to hold the Shift key, and click the last one. That selects everything in the list. Then, I'm going to click and drag it from the left side to the right side, and drop it. You'll see it starts to copy at this point. Right now, it's taking all those files on my hard drive and copying them up to the web server. This process is going to take a while. I'm going to speed up the video, but yours will probably go much slower than this. Our files are finished uploading. Notice that our two sides now look the same... our local side and the remote side. There is an extra cgi-bin directory up on the server... that's ok, don't worry about it. One important thing that I want you to make sure of right now is that you have this .htaccess file on the server. Sometimes people miss that. If you do it the way I did it here, you won't, but sometimes if people drag out of Finder, or something else, sometimes they miss that hidden file. So please make sure you have that .htaccess file, and that the two sides appear to be the same. If they do, then Step 1 is done. Our next step will be to create a database on the server. The database is where all of our content and configuration will be stored. To do that, we're going to need to log into the cPanel interface. You have a URL for your cPanel login. It is just your domain name with a colon followed by 2083. You could also just type it in there, if you wanted, but you should have a link. Let's talk a little bit about what cPanel is. cPanel is not a hosting company. They don't offer hosting directly to consumers. What they do is make software that they sell to web-hosting companies, and then those web-hosting companies put it on their own web servers, the purpose of which is to allow the web-hosting companies' customers to log into it and make configuration changes on their own without having to contact them. For example, we're going to log in and create a new database, but you can also do a whole lot of things in here, such as create new email addresses for your domain and things like that. The thing about cPanel is that it's used by a lot of different hosting companies, so if you learn how to use it, you can buy hosting from a lot of different people, or if you manage multiple sites... ...other people might be buying hosting different places, and when you go look at it will always be the same if it's cPanel. We're using cPanel in this course for that reason. If you come back and watch this video later, maybe down the road when you've got your own site somewhere else... if you're using GoDaddy, or DreamHost, or another hosting company, they may not use CPanel. If they don't, the steps that I'm going to show you are still the steps you need to do in their system, you're just going to have to figure out exactly where you go to do those steps. But the steps should be the same in either place. But, if you can find a hosting company with cPanel, then it should be pretty much exactly like what I'm about to show you. We'll use the same login that we had for FTP, same username and password. When I get into cPanel, I have a lot of choices here. I'm not going to go through what all these do; there's a ton of stuff you can do. I'm going to focus on MySQL stuff, the database stuff that we need to do right now. I did just want to point out that the way this cPanel looks, you can see cPanel look a little bit different, depending on which hosting company you might be working with. For example, I brought up another one. Sometimes it looks more like this. Sometimes it might be custom-branded with the hosting company. However, if you're using a cPanel hosting service, then even if it looks different, you'll notice that the icons are all the same... not the look of them, but the choices are the same. There's the Databases group... there's the Databases group here. There File Manager, Images, etc...File Manager, Images... It matches up no matter what it looks like. If you're watching this video and you're using a different service, it may look a little different, but just look for the same words. What we're going to do is use the MySQL Database Wizard to create a new database. By default, cPanel will always start the database name with the name of your account, your username, followed by an underscore, and you can't really delete it - you're sort of forced to have this. We can give it the rest of the name now. I'll call this Drupal, because that's what I'm going to put in this database, then, the total database name is drupal8_drupal. When I go to the next step, I need to create a user account to access the database. Now this can be confusing, because we just used the user account to get into cPanel, and then there's a user account to get into FTP - those are actually the same. After you install Drupal, you'll have Drupal user account. This is separate from all of those. This is a username and password that is only used for connecting the website to the database. Again, just like the database name, it will always start with your username_. I'll call the username the same as the database. Then I need to give it a password. I want to give it a good password, so I'm going to use the password generator down here which creates some crazy passwords. If you're going to do that, you need to make sure to copy it and put it down somewhere... I'm going to put it here in this Notepad. We're going to need it when we get to the installer for Drupal, when we get to Step 3, so I will copy that out, and I will check this box to say I've copied the password, and I'll click Use Password, see I've got this 100% rating because it's a very strong password. So, create the user, and I need to give this user account, you can see user is drupal8_drupal, database is drupal8_drupal, and then I need to give that user all privileges on this particular database. Check the first box, which will check everything, and click next. At this point we're done. We've created a database to store our Drupal files in. If we go back now to the website and put in just our domain name, we should be automatically redirected to the Drupal installer. The steps in the installer: first we pick a language... I'm going to stick with English. Then, we get a choice whether we want to install the Standard profile or the Minimal profile. We're going to install the Standard profile. They are different option sets; the sort of defaults that come out of the box. The Standard is typical stuff for running a website; the Minimal is extremely minimal. It's barely functional. It's great if you really already know what you're doing and you don't want to have to clean up a lot of the defaults, it's great. But if you don't know what you're doing, it can be totally confusing to try to use Minimal. If there's features we don't need, we can always turn them off. So, choose Standard, Save and continue. Here's where we need to put in that database information for that database we just created. If you remember, the database name was drupal8_drupal, and then I had the same username, and then the database password I copied onto this notepad, so I'll copy that again. The type is MySQL. Click save and continue. You can see now that it's installing Drupal, installing all the defaults that come with the standard profile. This is going to take a couple minutes, so I'll speed this part of the video up a little bit. Once that install process is finished, you'll get this form to configure the site. We just need to answer this last set of questions, then we'll have Drupal up and running. We need to give this site a name, I'll call it Learning Drupal 8. We need a site email address; this is the email address that will be used anytime the website sends out an email, like a notification, or a password reset... this is where that's going to come from. So, I'm going to put my email address in here, but I'm want to say this real clear: PLEASE DO NOT PUT MY EMAIL ADDRESS IN YOUR FORM AS YOU FOLLOW ALONG WITH YOUR VIDEO. A lot of people do that, and then I end up getting a lot of notifications, or bounces and things like that. Please put your own email address as you follow along, into that field. Next, we need this site maintenance account. We need to create this... I call this the super-user. This is the first account on the system; this is the user that has the maximum privileges, can do anything on the site. I'll call that user admin, then I'll going to give him a password. I see that Drupal thinks my password is a little weak, but I'm going to say that's okay for now, since this is just a test site. The email address is going to be the same for that account, but it could be different; you can change it. You can set some regional settings for your country, and your time zone. What that does is, for the default country, is set some of the things like number formatting and stuff like that, where there is some variance between different countries. This will set the defaults so that things look correct. The final options here are Check for updates automatically, and Receive email notifications, so if you leave these checked, Drupal will periodically check to see if there are any new versions of Drupal, like security updates. It'll do that on its own, in the background, and if you choose to receive email notifications, then it will email you when it finds those. So, I'll click save and continue, and there we go. At this point, I have a fully functional Drupal site set up and running on the web. You'll also see as I'm logged in as that super-admin user, the admin, and so I can make any changes I want to the website now; I can start to configure it or add content at this point.