Step 1: Download the Drupal software

Last modified: December 7, 2009 - 15:16

Where to find Drupal

Drupal is available in several download versions. Most people will want the version posted under "Official releases", as it is the latest stable release. The versions posted in the "Development Snapshots" list incorporate the latest advances, but haven't been fully tested for stability or security. Use with caution!

Please review Drupal version information if you are not sure what file to download.

  • The most current, stable version of Drupal. The Drupal community considers this its highest priority, and works continually to improve its stability and security.
  • The previous, stable version of Drupal. While not in active development, the Drupal community monitors security issues and patches them as quickly as possible, so you can feel safe using it.
  • Development versions.
    These incorporate the latest advances, but haven't been fully tested for
    stability or security. Use with caution!

Language Translations

Drupal has been translated to many different languages. Check whether a released package of the language desired is available at http://drupal.org/project/translations.

Downloading Drupal

Except for development versions, Drupal is available as a package with GNU Zip compression at http://drupal.org/files/projects/drupal-x.x.tar.gz, where "x.x" is the version number.
(Note: the download link for development versions may have "-dev" included in the filename. To get the exact link you can visit the Drupal Project download page, right-click on the "Download" link for the version you wish to use, and choose Copy Link in your browser's contextual menu.)

Before you begin, log into your server and use the cd command to move into the directory from which you will be serving your Drupal site. On many *nix computers the path from the server's root will be /var/www/html, so cd /var/www/html. On a shared server, or a server that hosts multiple domains, the path will be different -- perhaps the command cd ~/www or cd ~/public_html will work. If you are unsure of the proper directory to use, ask your hosting provider for assistance.

Once in the proper *nix directory, download Drupal using any download utility, the two most popular of which are wget and curl. Not every computer has both. If one doesn't work, use the other. The commands are:

wget http://ftp.drupal.org/files/projects/drupal-x.x.tar.gz
or
curl -O http://drupal.org/files/projects/drupal-x.x.tar.gz

(Note that the option for the curl command is the upper case letter "O" and not the numeral that stands for zero.)

(For these above commands, replace the "http://drupal.org/files/projects/drupal-x.x.tar.gz" string with the link for the version you will be installing. If you copied the link to your clipboard as suggested above, you can simply type "wget " or "curl -O " and paste the link into the command line.)

Uncompressing Drupal

To convert the .gz-format Drupal package into Drupal itself, type the following command (replacing "x.x" with the version number of the package you just downloaded, of course):

tar -xzvf drupal-x.x.tar.gz

You'll see a list of files as the package uncompresses. When it's finished, the directory you are working in will contain both the original .gz file and a folder named "Drupal-x.x": The latter is the Drupal software. You can now safely delete the .gz file by typing rm drupal-x.x.tar.gz.

Moving Drupal to its intended location

Now you need to move the contents of the drupal-x.x directory one level "up" into the web server's document root or your public HTML directory:

mv drupal-x.x/* drupal-x.x/.htaccess ./

The files from the directory you downloaded and decompressed have now been moved up a level into your web directory, and you can delete the drupal-x.x directory (which is now empty):

rmdir drupal-x.x

Before continuing to the next page ...

The base URL for your Drupal installation will be set in your Web server's configuration file. You will need to know this URL before proceeding to the next steps of the installation. If you are installing Drupal on your local machine the base URL may be: http://localhost. If you are installing Drupal onto a Web server your base URL may be a specific domain name (such as http://example.com).

If you have finished downloading, decompressing and moving the Drupal files on your *nix server or computer, you can skip the remainder of this page and proceed to the next page of this manual.

Note for Mac users

If you are installing on a Mac server, or are creating a test site on your Mac, you may also want review this handbook page during installation: http://drupal.org/node/22676 -- especially in cases where you don't understand where the "web server's document root or your public HTML directory" is on your local machine as referred to above.

Moving Drupal section too brief and generic 4 the general public

kazar - August 18, 2009 - 14:05

that last section re Moving Drupal is extremely brief and confusing for persons who are not familiar with web servers. Many of us multi-domain servers in which case the proper path if one uses WHM/CPanel is /home/[server_username]/public_html and might be different with other hosting CPs such as Plesk or Ensim. I'm not sure what to suggest for this section except perhaps to link to (or create and link to) supplemental pages that offer tips for installing under various hosting environments.

For example, when I copy & paste the mv command syntax provided in this section, this is what's returned in my Terminal session:

[~]# mv drupal-7.x-dev/* drupal-7.x-dev/.htaccess /var/www/html    
mv: cannot move `drupal-7.x-dev/CHANGELOG.txt' to `/var/www/html/CHANGELOG.txt': Permission denied
mv: cannot move `drupal-7.x-dev/COPYRIGHT.txt' to `/var/www/html/COPYRIGHT.txt': Permission denied
mv: cannot move `drupal-7.x-dev/INSTALL.mysql.txt' to `/var/www/html/INSTALL.mysql.txt': Permission denied
mv: cannot move `drupal-7.x-dev/INSTALL.pgsql.txt' to `/var/www/html/INSTALL.pgsql.txt': Permission denied
mv: cannot move `drupal-7.x-dev/INSTALL.sqlite.txt' to `/var/www/html/INSTALL.sqlite.txt': Permission denied
mv: cannot move `drupal-7.x-dev/INSTALL.txt' to `/var/www/html/INSTALL.txt': Permission denied
mv: cannot move `drupal-7.x-dev/LICENSE.txt' to `/var/www/html/LICENSE.txt': Permission denied
mv: cannot move `drupal-7.x-dev/MAINTAINERS.txt' to `/var/www/html/MAINTAINERS.txt': Permission denied
mv: cannot move `drupal-7.x-dev/UPGRADE.txt' to `/var/www/html/UPGRADE.txt': Permission denied
mv: cannot move `drupal-7.x-dev/cron.php' to `/var/www/html/cron.php': Permission denied
mv: cannot move `drupal-7.x-dev/includes' to `/var/www/html/includes': Permission denied
mv: cannot move `drupal-7.x-dev/index.php' to `/var/www/html/index.php': Permission denied
mv: cannot move `drupal-7.x-dev/install.php' to `/var/www/html/install.php': Permission denied
mv: cannot move `drupal-7.x-dev/misc' to `/var/www/html/misc': Permission denied
mv: cannot move `drupal-7.x-dev/modules' to `/var/www/html/modules': Permission denied
mv: cannot move `drupal-7.x-dev/profiles' to `/var/www/html/profiles': Permission denied
mv: cannot move `drupal-7.x-dev/robots.txt' to `/var/www/html/robots.txt': Permission denied
mv: cannot move `drupal-7.x-dev/scripts' to `/var/www/html/scripts': Permission denied
mv: cannot move `drupal-7.x-dev/sites' to `/var/www/html/sites': Permission denied
mv: cannot move `drupal-7.x-dev/themes' to `/var/www/html/themes': Permission denied
mv: cannot move `drupal-7.x-dev/update.php' to `/var/www/html/update.php': Permission denied
mv: cannot move `drupal-7.x-dev/xmlrpc.php' to `/var/www/html/xmlrpc.php': Permission denied
mv: cannot move `drupal-7.x-dev/.htaccess' to `/var/www/html/.htaccess': Permission denied
[~]#

I imagine this was all because on my web server, when logged into the user account whose site I'm installing on, /var/www/html is owned by root or by apache but not by the logged-in user.

AT THE VERY LEAST should we include a note that:
-- the destination path for the mv command will be different on different servers and to ask the web hosting provider for help if needed, and

ALSO, when I dl'd and decompressed 7-dev no .htaccess file was in the package. Is that an error in the package or should the "drupal-x.x/.htaccess" string come out of the mv command??

So even I, a person who's more technical than 97% of the general public, do not understand that mv command and therefore I had to resort to using my ftp client to move the files because I had no idea how to adapt the instructions to my multi-domain server ... therefore this Moving Drupal section FAILS THE USABILITY TEST. Help? thankx

ade.pt

what worked on my server for the mv command

kazar - August 18, 2009 - 14:08

[~]# mv drupal-7.x-dev/* drupal-7.x-dev/.htaccess ~/www

ade.pt

cleaning up the empty drupal-x.x directory left behind

kazar - August 18, 2009 - 14:11

it might be nice to have the user clean up the directory into which they DL'd by having them

rm -R drupal-x.x

after the mv

ade.pt

Mac instructions confusing

xtfer - October 31, 2009 - 23:11

The note for Mac Users is likely to confuse most of them. Few people who own an XServe are likely to need this guide, and the rest of the Mac Users will be confused by a page about CVS and OSX Server.

It may be more appropriate to link to http://drupal.org/node/369107 (which discusses PDO support), or just say that the web server document root is usually the folder...
/<user-name>/Sites/

xtfer.com

 
 

Drupal is a registered trademark of Dries Buytaert.