Installing Drupal 6 Locally with MAMP

brianvanaski's picture

Watch the video

Last week I covered how to set up a local web server using MAMP. Today we will take things one step further by installing Drupal 6 locally. I have broken the set up into 36 simple steps. I don't have much experience with databases so I am encouraging the more knowledgeable viewers to fill in any gaps that I might have missed.

  1. Download the latest Drupal release here.
  2. Move the directory containing the Drupal files into the MAMP htdocs directory. In my case it is in Applications/MAMP/htdocs. Note: if you use Finder you may miss moving the .htaccess file which is necessary for clean URLs to work. It is generally best to download and unzip Drupal directly in the document root (default is htdocs) so you don't miss the .htaccess. Tip: you can download and install TinkerTool which has the ability to view hidden files. http://www.bresink.com/osx/TinkerTool.html.
  3. Launch MAMP and click "Open start page."
  4. Click "phpMyAdmin" in the menu bar.
  5. Click the link "Databases" near the bottom in the left column.
  6. On the "Databases" page enter a name for your Drupal database in the "Create new database" field at the bottom of the page.
  7. Select "utf8_general_ci" under the "Collation" drop-down (must be utf8!).
  8. Click "Create".
  9. Next you must create a user name with the privileges Drupal requires to use the new database.
  10. Go back to the main phpMyAdmin page and click "Privileges". You can use the home icon in the upper left to navigate back to the main page.
  11. On the next page click "Add a new User".
  12. Fill out the "Login Information" form, making sure to change the "Host" field to "Local" and not leave it as "Any host".
  13. Leave the "None" radio button selected under the "Database for user" section, and under the "Global privileges" section leave everything unchecked.
  14. Click "Go".
  15. On the next page scroll down to the "Database-specific privileges" section and select the new Drupal database you created from the dropdown.
  16. Check the SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX and ALTER checkboxes and then click "Go".
  17. Open the folder /Applications/mamp/conf/php5.
  18. Edit php.ini and change the line that says memory_limit = 8M to memory_limit = 32M.
  19. Save and close the file.
  20. Inside your Drupal directory create a "files" directory. Change its permissions to read & write for everyone.
  21. Create two Directories called "modules" and "themes" in /Applications/MAMP/htdocs/sites/all/themes.
  22. Open the folder /Applications/mamp/htdocs/sites/default and edit default.settings.php and add the line ini_set('memory_limit', '32M');.
  23. Save and close the file.
  24. Inside /Applications/MAMP/htdocs/sites/default/ create a blank php file called settings.php.
  25. In your web browser go to http://localhost:8888/yourdrupaldirectory.
  26. Click install drupal in english.
  27. Check mysqli as the database type.
  28. Enter in the name of the database you created earlier in MAMP.
  29. Enter in the username and password.
  30. Then continue.
  31. Enter in your site name.
  32. Enter in your site email address.
  33. Enter in a name for your administrator account.
  34. Enter in an email address for your admin account.
  35. Enter in a password for the admin account.
  36. Click save & continue.

There you have it! Your local install of Drupal 6 should be complete. There are a lot of steps but once you've done this a few times it becomes quick and easy. In the future I will cover how to take your local install and move it to your web server. If you have any questions or suggestions please leave a comment.

Comments

Installing Drupal 6 Locally with MAMP

Thank you thank you THANK YOU! I guess i was just overlooking the obvious ;)

Thank you!

I tried so many other suggestions. Yours was the only one that worked!!

Thank you so much.

wonderful tutorial!

WOW. What a great tutorial. Everything worked like a charm. You gave all the details and in plain english. Thank you so much!

Installing Drupal 6 Locally with MAMP

Thanks!

Installing Drupal 6 locally with MAMP

Easier and better than the instructions for Drupal 7 using shell. Thanks so much!

Great Job

You really helped me out! I think you left out drupal in /Applications/MAMP/htdocs/sites/all/themes. But by far the best guide I have seen! I wouldn't have got it to work with out you!

It's really helpful! Thanks

It's really helpful! Thanks man.

That's really helpful, I wish

That's really helpful, I wish you had written this a few months earlier when I was learning how to install drupal on windows 7!

I look forward to your instructions on how to move my installation to my web server.

Tutorial

Thanks, but I did run into a problem. I guess I'm not as smart as the other commenters.

In step 25, my browser is unable to go to http://localhost:8888 - no idea why not ....

Thanks, Jim

Problem opening locathost

jimbob54,
You might check your windows hosts file. In Vista and in Windows 7, it is at:
c:/Windows/System32/drivers/etc/hosts

Inside it you should see an entry such as:

127.0.0.1  localhost loopback
::1        localhost

If you don't have that, you should add it.

Localhost

Thanks for the response.

I'm running MAMP on MacOS X 10.6.4 ... the message is:

  Safari can’t open the page “http://localhost:8888/drupal-6.19” because Safari can’t connect to the server “localhost”.

drupal-6.19 is the name of the directory that contains the drupal download ....

+J

You might want to look in

garrettinteractive's picture

You might want to look in your dashboard widget on OSX to see if the MAMP components are running. Another thing you could check is if the Apache webserver in OSX is also running (System-preferences>Sharing>Web Sharing [should be un-checked]), this can cause a conflict in my experience.

Thanks

Thanks for the response. MAMP is running, and Web Sharing is unchecked. MAMP's Apache port is 80, and the MySQL port is 3306

I have run some php / mysql progs against this MAMP stack before, but I haven't tried them lately (since I deployed them to GoDaddy) ....

+J

Where is my drupal directory?

Inside your Drupal directory create a "files" directory. Change its permissions to read & write for everyone.

don't know where this is?

thanks.

stuck after 29

Thanks for the great video! I followed it verbatim
but have hit a wall. After entering info for #29
It then sent me back to my drupal install page
but this time it was blank like it could not find it.
It had the same URL as your's on the screenshot but
mine was blank. any ideas?

thanks!

You probably need to edit the

dunkoh's picture

You probably need to edit the php.ini file to increase the amount of Memory that php is allowed to use.
The default isn't sufficient usually.

Still no luck

I did expand the memory to 32M on the php.ini file.

When I entered my name and password I get a blank screen with a lock image on the URL and this
http://localhost:8888/drupal/install.php?profile=default&locale=en.

thanks.

32MB should be enough memory

cjdavis's picture

32MB should be enough memory for simply installing Drupal. Did you restart
apache? It may not have reread the php.ini file yet.

You should also check the php error file as well. Whether there is one and
where it is located is also defined in the php.ini file.

Thanks, I think I have not enough HD Memory left

I believe I may need to make some room on my hard drive actually. I just realized I am maxed out on it.
Ooops... I am going to make space then re-install both MAMP and Drupal and see what happens.

Thanks again!

Can't get pages to load

I've got Drupal installed per the instructions, but can't get past index.php. Every link or attempt to log in to the site throws back a 404 error. This is a copy of a site already in production, and that site is working fine. I just need to have a local install as I create documentation.

Any help would be appreciated.

Thanks,
Barbara

Thanks

andy.smith's picture

Thanks - great tutorial - i was having some fun times trying to figure out clean URLs and your suggestion worked great. Now that I have the .htaccess file in place all is back to normal.

make a blank php

besides that I understand that it ends .php what script does it contain?

Cincinnati / Dayton / SW Ohio - CINDUG

Group organizers

Group events

Add to calendar

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week