Installing Drupal on a hosting account
Drupal is a content management system, similar to WordPress. According to drupal.org, "Drupal is a free software package that allows you to easily organize, manage and publish your content, with an endless variety of customization." Drupal has a large number of free add-ons available which allow it's functionality to be extended.
Before anything else, you need to log into your shell account. To do this, you'll need a Secure Shell (SSH) client. You can read more about shell access on your hosting account here.
Before anything else, you need to log into your hosting account so that you can upload files. To do this, you'll need an FTP client. You can read more about FTP access on your hosting account here.
Installing Drupal - Part 1
Once at a shell, your current location will be your home directory. You can use the
ls command to get a list of files and directories in your home directory. Use the command
cd www to change into the web directory. By running
ls again, you'll see a directory that corresponds to the address of your website. Change into the root web directory for your site. For example, if your website was 'example.mythic-beasts.com', then you'd run the command
cd example.mythic-beasts.com. If you want to install Drupal in a separate section of your site, For example, 'example.mythic-beasts.com/blog', then you can do this by creating a directory called blog, using the command
mkdir blog and then changing directory into that folder using the command
I'm going to assume that you are using the free FileZilla FTP client for this support article. Once you are logged in to your hosting account with FTP, your current location will be your home directory. Double-click on the
www to change into the web directory. You should now be able to see a directory that corresponds to the address of your website. Double-click on that directory to change into the root web directory for your site. If you want to install Drupal in a separate section of your site, For example, 'example.mythic-beasts.com/blog', then you can do this by creating a directory called blog, by right-clicking when in the root web directory, and selecting the 'Create directory' option. From here, replace the highlighted 'New directory' text with the name of the directory you want to create. You'd change this to 'blog' if you wanted your Drupal site to be at the aforementioned example link. Following this, you need to double-click on the new directory you just created.
Now that we are in the directory where we want to install Drupal, the next step is to download it. You need to go to the Drupal download page and copy the tar.gz link for the the latest reccomended version. Hopefully, you'll be able to paste the link into your SSH client by right-clicking while in the terminal, or right-clicking and then selecting paste. Otherwise, I'm afraid you'l have to do it manually. Use the command
wget [link you just pasted in] to do download the file (it should only take a second). Once the file has downloaded, use the command
tar -xzvf drupal-x.xx.tar.gz, where x is the version number of Drupal that you downloaded, to extract the files from the tar.gz archive. If you use the
ls command, you should be able to see that a new directory called 'drupal-x.xx' has been created. There is now no use for the 'drupal-x.xx.tar.gz' file, so you can remove it using the command
rm drupal-x.xx.tar.gz. You need to move the files out of the 'drupal-x.xx' directory into the directory you are currently in. You can do this using the command
mv drupal-x.xx/* . (notice the dot character at the end. It is part of the command, not a full stop). You can now also remove the 'drupal-x.xx' directory with the command
rm -r drupal-x.xx.
Now that we are in the directory where we want to install Drupal, the next step is to download it. You can download it from here the Drupal download page. Click on the zip link for the the latest reccomended version, and save the file to somewhere you can work from on your computer, as you'll need to extract the files from the zip archive before uploading them to your hosting account.
If you are running Windows, then you'll be able to right-click on the zip file, select 'Open with' and then select 'Windows Explorer'. From here, you can right-click on the 'drupal-x.xx' directory and copy it to the clipboard. Go to a different folder you want to work from, right-click and choose paste.
If you are using the Safari browser on a Mac, then the zip file will be extracted automatically once it has been downloaded. If you go to your Downloads folder, you'll see the 'drupal-x.xx' directory there.
This is the Drupal directory we'll be uploading to your hosting account. There is now no use for the 'drupal-x.xx.zip' file, so feel free to delete it.
Using the file browser on the left-hand side of the FileZilla FTP client, locate the 'drupal-x.xx' folder you have been working from. When you find it, double-click on the folder to change into it. Use the key combination Ctrl + a (or CMD + a on a Mac) to select all of the files in the folder. Right-click on the selected files and choose upload. Wait while the files are uploaded to the server.
Installing Drupal - Part 2
You need to open a web browser and go to the site where you just installed Drupal. You should be greeted by the Drupal installer page, which begins with 'Select an installation profile' If you don't see this page, then it's possible that you made a mistake during the previous steps. Please go back and check this before contacting firstname.lastname@example.org if you require further assistance.
Select the standard installation profile and then click on the 'Save and Continue' button. English is the only built-in language, so click 'Save and Continue' again. Now it's time to set up your database. For this, you'll need the login information that was sent to you in an email when you first joined mythic beasts. From this email, you'll need the Database name, the MySQL username, the MySQL password (which will be different to the password for your shell account), and the MySQL hostname. Ensure that the database type is set to MySQL, and fill in the information mentioned previously. To fill in the MySQL hostname, you have to expand the advanced options form. You only need to fill in the Table prefix field if you are using the Database for more than one thing. A good prefix would be 'drupal_' or similar. You can leave the Database port blank. Once you have done this, click the 'Save and Continue' button as usual. Drupal will now install (which shouldn't take too long).
The site configuration section is pretty self-explanatory. You have to fill in a site name (by default it will be something like 'example.mythic-beasts.com'). Note that it doesn't have to be in an address type form, for example, it could be 'Example Drupal site'. You'll want the site email address to be something in the sites domain, such as 'email@example.com'.
The site maintenance account needs to be set up securely. Make sure you give it a strong password, as someone who is able to log into the maintenance account could deface the site.
The rest of the site configuration should be fine as they are, so you can go ahead and click 'Save and Continue'. Once you have done this, you'll see a message stating that you have installed drupal. Follow the 'Visit your new site' link to do just that!
Your first Drupal post
It's time to write a post on your new Drupal site, just to check that it's working correctly. Click on the 'Add new content' link and select the article option. Give it a title and optionally some tags that identify what the post is about. Fill some text into the body and then scroll down and hit the 'Save' button. Congratulations - you have just made your first post.
For further help, go to the Help tab at the top of your Drupal page. There is an extensive amount of support available on there.
Improving Drupal Performance
We highly recommend that you read this article which will tell you how to improve the performance of your new Drupal site.
You may want to take a look at our support page on Drush, a command line shell and scripting interface for Drupal.
Copyright © 2000-2012 Mythic Beasts Ltd. All Rights Reserved.