I wrote this article to help web designers and programmers interested in using the drupal open source content management platform. If you use 1and1 servers for hosting, then you will encounter a few issues with your install - which this article will help you overcome.
Things You'll Need
- 1and1 Linux hosting package
- Download the Drupal source files from drupal.org
- FTP program (Filezilla)
- text editor (wordpad)
OVERVIEW: Before we get into any of the steps below, I am assuming that you are a web designer or programmer that has been looking for an open source content management platform, and decided to use Drupal. I am also assuming that you are hosting your website with 1and1 on a linux package. If both of these assumptions are correct, then proceed to step 2.
INTRO: Congratulations, you have chosen a really cool content management platform that keeps expanding and growing. I am still learning the system myself, but I wrote this article to help anyone who has run into the same install issues that I had when tring to load drupal onto my 1and1 server linux hosting package. I stress that you need to have a linux hosting package because you CAN NOT install drupal onto a 1and1 MS package. I have tried, and it does not work.
STEP 1: 1and1 Linux hosting package confirmation - Make sure that you have a 1and 1 linux hostig package. I recommend that you have at least a home package, but a business package will really be what you want to help expand the drupal system and to better manage your database. Check your 1and1 control panel settings to make sure you are set up correctly. You should have PHP support and a MySQL database option. If you are on the MS package, you will want to "upgrade" your package to a Linux package. I had to do this with two of my accounts to get drupal to work.
STEP 2: Download Drupal files to your desktop - Go to the drupal.org site and download the most recent drupal version. At the time of my writing this article, the most recent version is 6.10. Download this to your desktop first so that we can easily work with the files. You will notice that you got a tar.gz file downloaded to your desktop. (link in resources below)
STEP 3: Expand Drupal Files - Now we are going to unzip or expand the files. Since this is a tar.gz file, and not a zip file, I recommend that you download and use a program called 7-zip (an open source file archive program) instead of winzip or other popular programs to expand the files. 7-Zip is a great tool, it is free, and it handles archived files really well. Download this program, then unarchive the drupal files to your desktop. (link in resources below)
Great, now you should have a new drupal folder on your desktop with all of the items fully expanded. If you did it correctly, you will see the following folders contained inside your drupal folder: "includes", "misc", "modules", "profiles", "scripts", "sites", "themes", and other files below. Many directions will tell you to make changes at this point, but I want to urge you to follow my instructions now to help you visual and check in real-time the changes you are making.
STEP 4: FTP drupal files to your web server - Now take all of these files and FTP them to the root of your website. This would be the www folder or the main directory of your site. For the 1and1 server package, it would be the following www.yoursitename.com/ where you will see the "/" in your FTP client. I recommend that you drop the entire drupal folder into this directory to learn how to install the tool. Once you learn how to install the tool, you can later move all of the files out of the folder and drop them directly into your site's root structure. For this example, just call the folder "drupal" - so for the purposes of this example and to help you install the program, you will be working with the following directory on your own server: "www.yoursitenamehere/drupal"
STEP 5: Take a look at the drupal web install guide - The cool thing about drupal is that it has an install guide that you can access using a web browser. It helps you by giving you a checklist of things you need to correct, and it also allows you see that you have put the files onto your website server correctly. In this step, we are going to take a look at the web browser install tool, and proceed with configuring some files to get this to work correctly. If you followed my example, you can now open a web broswer and type in the following URL path to get to the installation of the drupal tool: www.yoursitenamehere/drupal
If you did as I specified, you should a screen that looks like the one attached. This will be the drupal online install guide, and it will immediately show us an error screen indicating that we need to configure our settings.
STEP 6: Disable "register_globals" on 1and1 server - So as the error message says - we want to disable our "register_globals" on our server. Doing this is very simple. For the 1and1 server package, to do this, we are going to need to create a file called php.ini and save it to the root structure of our drupal directory. Within this php.ini file we are going to place some code that disables the "register_globals". Now you may be wondering, how do I make a php.ini file? You can do it using dreamweaver, textpad, notepad, or any web editing tool you use. To keep this simple, I want you to do this using notepad.
STEP 7: Create a php.ini file - Open notepad or a basic text editor. Save this file to your desktop as php.ini (if it saves as a word file, that is fine, just change the name later to php.ini) copy and paste the following code into the file and save it to your desktop drupal folder:
register_globals = false
(see picture for reference) That is it!
STEP 8 FTP php.ini file to web server - Now take this file and FTP it to your web server in the root directory right into the drupal folder this means, drop it directly into the following location on your server - "www.yoursitenamehere/drupal". Once you do this, go back to your web brwser drupal install screen found here: www.yoursitenamehere/drupal, and refresh the screen. You should now see an error message that speaks to copying a setting.php file. It should look like the same message as the error image attached to this step. This is a common error message because as part of the drupal install process, we need to copy the setting.php file and change its permissions.
STEP 9: Create a "settings.php" file - This is extremely easy to do and is part of the drupal install instructions that you can find on the drupal site. I will explain how to do it here however to keep you moving along smoothly. I do want to point out that you should use the FTP program "Filezilla" for this step, as it allows you to change the CHMOD permissions on a file, where dreamweaver and other FTP programs do not. If you need to take a moment to install the free FTP program filezilla, please do that now using the link in the resource section below.
STEP 10: Create a "settings.php" file - Going back to your local drupal desktop folder, find the folder called "sites" and open it up. Inside you should see two more folders named "all" and "default". Open up the folder named "default". You should now see a file named "default.settings.php". Simple copy the default.settings.php file resave it right into the "default" folder along with the default.setting.php file. Since you can not have two files of the same name in the same folder, you are going to need to rename this new copied file as "setting.php". (see image for reference) and CHMOD it to 777, to make it readable (do this using filezilla if your FTP client does not allow permission changes)
STEP 11: FTP and CHMOD 777 "settings.php" file - Now we want to FTP this file over to your website server file directory into the "default" folder in the "sites" folder to go right along with the "default.setting.php" file. So the path you will be using to FTP this file to your server if you are following the steps of this write-up is: www.yoursitenamehere/drupal/sites/default
Now, I recommend that you use Filezilla to FTP this file, because we need to change the CHMOD (permissions) to 777. This makes this file readable and allows drupal to proceed with the installation on your server. Once you have connected to your web server using Filezilla, right click on the "setting.php" file and change the "file attributes" to 777. Then FTP this file to your server. I am assuming that you know how to use an FTP program, and if not, please see my link in the resources section to my article about how to use Filezilla.
STEP 12: Check drupal web install guide - Once you have uploaded this file to the server in the "default" folder within the "sites" folder of your websites root file directory, go back to the web browser drupal install view here: www.yoursitenamehere/drupal" and click refresh. If you did this install correctly, you should see a screen similar to the one attached to this step.
STEP 13: Increase PHP Memory - NOTE: please read the Drupal Database Configuration screen that you have in front of you now. There is a key element on here that we must address before we get into the actual database setup. In the yellow box, Drupal recommends that we increase our PHP mempory limit to 16M to help prevent errors. I HIGHLY recommend that at a minimum you increase the PHP memory to 16 MB, but it would not hurt to increase it to 32MB. To do this, we are going to go back to the "php.ini" file that you created and add another line of code. Below the "register_global" code you created, add the following:
memory_limit = 36M
(See image for example). Now FTP this new file back into your web file root folder and overwrite your old php.ini file and you should be done increasing the php memory. Go back to your drupal web broswer installation screen and refresh it, and you will now notice that the yellow box is gone, and we are left with the database configuration fields. (see image).
Excellent job so far! We are now at the fun and easy task of setting up a 1and1 MySQL database, and tieing it to the drupal program that we are installing. If you do not understand anything about MySQL databases, do not worry! This is easy to set up using the 1and1 control panel and we only have to change a few items in the drupal code to get everything to synch up. So lets get started creating our 1and1 database!
STEP 14: Create a 1and1 database for your account - Now we want to create a database in our 1and 1 control panel. Log into your 1and1 account using the customer login, and click on the MyAQL administration toolbar in the control panel. See image for reference.
STEP 15: Create a new database - Within the 1and1 MySQL admin tool, there is a button that says "New Database". Click this to get a screen that says MySQL Database Setup. You will be asked to give your database a name. Call it Drupal for now, select the version of MySQL to be 5.0, and then click "setup". You will get another screen that shows you your user name, password, host name, etc. Just click Finish. In about 30 minutes, you will have a new 1and1 database setup. When you have done all of these steps, and roughly 30 mintues have passed, you should see that your new database was created and you will also see that you have the following information for your new database:
Database name: db#########
Host name: db###.perfora.net
User name: dbo#########
STEP 16a: Add the database info to your "settings.php" file -
There are actually two ways to do this step. Option A shown here is to use the drupal web install tool to enter in your database info. Option B outilined in the next step is the manual way to do this. I actually prefer to do the manual method in Option B, but you can do this either way.
Here is option A: using the drupal web install guide at www.yoursitenamehere/drupal
Simply enter in your site database name, database username, and database password into the basic option. Then open up the advanced options and enter in your site database host name.
Then click save and continue at the bottom of the screen. (see image for reference)
STEP 16b: Add the database info to your "settings.php" file -
Here is option B: Manual process
Now that you have created a database, and you have all the info needed for your database, we will need to manually add this info to the drupal "settings.php" file that we created earlier and uploade to our web server. Doing this skips using the drupal web install guide. You might wonder why you want to do this. I have acutally had issues using the drupal web install guide during this step, so I do it manually, but try Option A if you are not comfortable doing this. To do Option B, simply open the "settings.php" file again using the text editor, and change the following information:
Search for $db_url =
Change the line from this:
$db_url = 'mysql://username:password@localhost/databasename';
To this, using the info from step 15 above:
$db_url = 'mysql://dbo#########:****@db###.perfora.net/db#########';
Now save this document and FTP it to your server again using Filezilla as CHMOD 777.
STEP 17: Drupal Final Site Configuration - Congratulations! You are now on the last step of your drupal install on a 1and1 server. If you did all of the steps above correctly, drupal will finalize the install, and you will see the attached screen when you go to the drupal web install guide at : www.yoursitenamehere/drupal
Now, just type in the last requirements that it asks you for and click save and continue. It will now take you to your new drupal site and you will be logged in as the admin. Now you can set up your drupal site anyway you like. I will try to write some more articles about how to set up yoru drupal site, but there is a lot to do for this, so you you should probably read the drupal forums on the drupal.org site.
STEP 23: Finished.
How to Redirect Pages in Drupal
How to Install Drupal On 1and1 Servers. I wrote this article to help web designers and programmers interested in using the drupal...
How to Install Wordpress On 1and1 Servers
How to Install Drupal On 1and1 Servers; How to Host More Than One Domain on 1and1; How to Install WordPress in Its...
How to Install Magento on 1And1 VPS
Ecommerce merchants and web developers look to Magento, an open source code based shopping cart software package, to create user-friendly and reliable...
How to Move CMS Made Simple to a New Server
Content Management Systems, or CMSs, have made it very easy to install and run a full-featured website. Most CMSs come with basic...