How to create a Drupal test site on your own PC

tagged with

Depending on what you need from a website, you might have a lot or very little work to do on the basic platform that Drupal provides. A lot of people simply install Drupal to their live server and fiddle around with it 'til they have what they need. This is not really the best way to do things - its more like a short cut. To really do a good job you should always set up a development or test machine on your own computer.

The idea behind setting up a development machine is that you can hack away at one or more websites and do as much damage to the site as you like. If it breaks, or doesn't work for some reason or another, it's not a real tragedy - no potential customers are browsing it so it's not like you're losing business. Provided there are regular backups (something that's easy to set up in Drupal) you can always revert back to an earlier stage and start again.

Setting up a development machine also gives you a better idea of how websites, webservers and the Internet work together. This is fairly valuable information when it comes time to find a host and set up the live site. By seeing how Drupal fits into the development webserver, and how the database, provided by the server, relates to the website, along with learning about file systems, you come out of the experience in a position of power rather than being at the mercy of web developers or hosting services.

To set up Drupal on your own computer:

  1. Download and install the XAMPP webserver
  2. Once installed, browse to http://localhost/phpmyadmin and create a new database (give it a meaningful name) and a new user - remember these names and passwords as Drupal will need them
  3. Download Drupal
  4. Extract the drupal files to the root folder of the XAMPP server (this is usually something like C:xampp/htdocs on windows machines)
  5. Rename the extracted drupal folder to something more meaningful, like mynewsite
  6. Browse to http://localhost/mynewsite in a good browser, like FireFox or Chrome (remember to substitute the bold part of the URL for the name of the extracted drupal folder in C:xampp/htdocs)
  7. Follow the Drupal setup procedure and remember to enter the database details exactly as you entered them in step 2

Drupal will set everything else up behind the scenes and once the site is succesfully installed you can begin working with content, playing around with the theme and so on. The real benefit here is that you can download and install all sorts of interesting modules, learn how to use them, and make a really powerful site. Once you have something you like, copy it and install it to your live server and away you go...