Drupal
From DreamHost
Drupal is a full Content Management System (or CMS) that can be deployed with any number of purposes. It has been developed as an open-source project and released under the highly open GPL license. As such it is free both as in beer and as in speech. Drupal prides itself on being a system wherein the openness allows any developer to easily add what she needs using modules, effectively creating an infinite platform for expansion and growth. It is written in the PHP scripting language.
Contents |
Drupal adoption advice
Drupal is a highly flexible and powerful tool and as such should be used by those with knowledge of HTML, web applications and at least a vague notion of how Databases (such as MySQL) function (as usual you don't have to actually know PHP and SQL to make it function but a working knowledge of PHPMyAdmin, the mysql GUI application is helpful if not mandatory for using Drupal.)
If your goal is simply to maintain a blog (or weblog, something Drupal is quite capable of) you might consider using a simpler and more targeted application like WordPress, which will be less confusing and more stable due to its simplicity.
Standard Drupal Features (as of 4.7.x)
Drupal is highly modular; most of Drupal's user-visible features are written separately from the codebase. This section lists the functionality provided by the modules included in the latest Drupal release by default. The features provided by your Drupal system can easily be expanded by adding or writing other modules.
- Users (scalable user structure)
- Forums
- Blogs (per user or collective)
- Articles
- Static pages
- Collective Book Writing.
- Taxonomy (categories)
- File-attachment on posts.
- International interface translations.
- Multi-language support.
Installation
Drupal 7
Drupal 7.x is easy to install on Dreamhost. The steps to follow are:
- Copy the current Drupal 7.x files to your Dreamhost website root
- Create your MySQL database for Drupal
- Go to your Dreamhost MySQL panel and create it (database name + hostname)
- You might have to wait up to over 30 minutes, the time the newly created hostname propagates and is recognized by the Drupal installer
- Go to your website to start the Drupal 7.x installation
- The installation steps are simple to follow
- Note that in 'Advanced options' (hidden by default), you must change the default "localhost" to the full MySQL hostname (eg mysql.mywebsite.com)
- Configure Drupal and install third-party modules
- It is recommended that you either deactivate account creation requests (in /admin/config/people/accounts) or install a spam-reducing module such as Mollom in order to stop spam user accounts right away
- This is what requires more time and experience
Drupal 6
Drupal 6.2 "Easy Mode" One-Click Installation
Dreamhost provides an "Easy Mode" One-Click installer of Drupal 6.2 (Look under the Dreamhost Webpanel -> "Goodies" -> "One-Click Installs" -> "Install New Website software - Easy Mode"). This is currently a "Beta" feature. It is aimed at non-technical users who want to quickly start using a first-class Content Management System like Drupal (without doing ANY command-line Linux kung-foo, ever). With the "Easy Mode" Drupal install, you can expect to spend 1/10th the time and stress on your Drupal installation and setup (as opposed to "hand-installing" it in the traditional manner from the command line).
The downside of Dreamhost doing this management for you is that you lose the freedom to install your own Drupal themes and modules: you can take or leave the ones that Dreamhost decides to install. This is because all of Drupal files for that install are hosted on a central server that you do not have FTP access to. In addition the domain you installed it on will not show up in your 'MANAGE DOMAINS' section. ( This is also stated on the one-click install page where you initially installed Drupal ). In this manner the Drupal install may be different than other 1-click installs you might have done in the past that have the script files in your own disk space where you can ply through them and make modifications at will.
So this is a great option for those who do not want to do any future OS-level System Administration of Drupal: think of the future maintainers of your website who might not be as technically skilled in Debian and Linux System Administration as you are (and don't want to ever leave the web-based comfort of Drupal itself). It's also a great option for lazy Drupal Administrators who don't want to have to keep an eye on Drupal's Security Announcements (and installing the security fixes in a timely manner).
Details of Easy Mode
For a further discussion, and a list of the modules and themes currently provided in the "Easy Mode" install, please see here.
Migrating out of Easy Mode
If you set up a site using Dreamhost's Easy-Mode drupal multi site and want to move it to an installation of your own (perhaps because you want more control over themes or modules), you can simply delete the "easy"one-click installation, and that will cause your existing Drupal Easy-Mode database to appear in your "Goodies -> Manage MySQL section of the account control panel. This way you can migrate content, configuration and user accounts.
Drupal 6 Manual Installation
As of April 10, 2008 Drupal is in version 6.2. This is the easiest version of Drupal ever. It includes a screencast for installation. Directions for upgrading from version 5 to version 6 also include a detailed screencast. Detailed instructions for installing earlier versions specific to Dreamhost are below. You can either install version 6 directly, or install an earlier version and then upgrade to the latest version.
WARNING: You may get the following error during installation: "Failed to connect to your MySQL database server. MySQL reports the following message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)." First, try the following: click the Advanced tab and change the server from its default "LOCAL" to the actual mySQL user hostname, such as example.example.com. If that doesn't resolve your problem, chill out and come back to it a short time later. It may simply be that the server is overtaxed at the time and will function properly when the heavy use period has subsided.
It may also be that, if you have just created the hostname that you are using from withing the DreamHost web panel, the DNS settings for that hostname have not yet been updated across the internet and that hostname is just not available yet. You can easily test whether or not this is the case by browsing directly to the hostname (http://mysql.example.com, etc.) to see if that host if reachable. If it is reachable, you will be presented with an apache authentication dialog box; if it is not, you will get an error. If you cannot browse to the host directly, just wait until you can do so before proceeding.
Older Unsupported Versions
For instructions on installing older Drupal version, which are unsupported and not recommended, see this old documentation.
Drupal Cron Jobs
This is something that many novice Drupal users (in fact many novice website designers/developers) have trouble with. It's a good idea to check out the Crontab page here on the wiki as a start, but here is some basic info you need to get the various Drupal Cron-Dependent stuff up and running (such as the search function).
Additional instructions are found on the Configuring cron jobs on DreamHost page on Drupal.org.
Using the Web Panel
Cron jobs can be set up directly through your DreamHost control panel here.
The command to be entered is:
curl --silent --compressed http://example.com/cron.php
Note for Drupal 7 installs: Make sure to use a cron.php URL that includes your "cron key", a query string variable provided by Drupal. The unique URL to the cron script including the cron key can be found on the Status Report page, under the Cron heading.
Using a Shell
- 1. Create a text file (name it crons.txt) with your cron job on the first line, it should read something like this:
0 2 * * * /usr/bin/wget -q --delete-after http://www.yourdomain.com/cron.php
- Make sure that there is a line break at the end of your cron job, this lets it know that the job is over! Save the file as a text file.
- Specifically this tells the server to run "wget" every day at 2:00 am. The address at the end, tells it specifically to visit the cron.php file, which is where Drupal stores any cron job stuff (such as search indexing). You can read more about Crontab here on the wiki, especially if you would to change it to run weekly, rather then daily, or have run it at a different time.
- Note for Drupal 7 installs: Make sure to use a cron.php URL that includes your "cron key", a query string variable provided by Drupal. The unique URL to the cron script including the cron key can be found on the Status Report page, under the Cron heading.
- 2. Upload your text file to yourdomain.com/ via your FTP Program. It must be uploaded via ASCII mode, this should be automatic for most FTP Clients, but just double check to make sure!
- 3. Login to your account via SSH. Make sure that you have the permission to do so, via Dreamhost's Control Panel under the "Manage Users" section.
- 4. Type in:
crontab yourdomain.com/crons.txt
Alternately, check to see if you are in your home directory by typing "pwd". If you see /home/yourUserName then you are in your home directory. Type in:
crontab ./crons.txt
- Make sure your using the correct domain/folder for your site where crons.txt is located.
- 5. If all went well type in the following:
crontab -l
- If you see your cron job on its own line, then your done! Your Drupal Cron Job is now setup!
To "force" a cron job event for Drupal (such as on a brand new Drupal site), you can actually browse to the file manually via SSH using the following:
wget http://www.yourdomain.com/cron.php
If all goes well, then you won't see anything except for the file's name and some other information, but if you check your Drupal's Search Settings, it should show an increase in the amount of your site that has been indexed.
Removing Drupal from your Domain
To remove a Drupal installation from your domain, just delete all your Drupal related directories and files from your domain's space and, optionally, delete the database in the Control Panel. Dreamhost does not completely empty your directories even if your remove the hosting option. Should you later re-add the domain's hosting, any files yo had left in the directory could still be present.
A database created on DreamHost is never fully dropped using the Control Panel -> Goodies -> Manage MySQL screen. If you login to the host with the appropriate credentials, via phpMyAdmin or the shell command line, you'll still find your database. Dreamhost does not completely delete the database as the result of a Control Panel action. Be careful!
If you no longer want a database you have set up on DreamHost, and you have any sensitive data in the database that you want to obliterate, you might consider dropping all the tables from the database so that the data can not be viewed in this manner.
See also
- Drupal Multisite Install
- Advanced Drupal Webshop
- Drupal Upgrade
- Drupal Troubleshooting
- Using PHPMailer with Drupal's SunMailer module
- Joomla!, another content management system (CMS) also used at DreamHost
External Links
- Drupal - Drupal's Main site.
- Download - Download page for Latest version of Drupal
- Handbook - Drupal's Official Handbook (not perfect)
- Forum - Drupal's forum, search before asking a question!
- Videos - Bittorrents for some videos of presentations at a Drupal Conference.
- Podcasts - Podcasts (video and audio) by Drupal developers Lullabot.
- Themes - Some preset themes that can easily be used in your Drupal installation.
- Building Online Communities With Drupal, phpBB, and Wordpress - Apress book showing users how to effectively configure and use all three applications
- Intro to Drupal - Intro to Drupal - An audio podcast by happy DreamHost client CreativeXpert. A great place to start.
- Drupal for Beginners - Overview of Drupal for noobs: module recommendations, links to key resources, more. (Hosted on DH, too!)

