• blog
  • Photography
  • Graphics
  • Videos
  • Contact
  • About Sean

Tag / MySQL


Tweet

Installing WordPress Locally on a Mac

Posted by Sean Smyth on 29 Aug 2008 / 1 Comment

Why would I want to install WordPress locally on my Mac?

Well, the main reason ( and the only reason that I’ll use it for ) is to test out new themes. Installing locally eliminates the hassle of having to upload the .css and .php files everytime you make a change to their content. And it means that your live site is not disturbed and your viewers are not greeted by a half finished theme.

How would I go about this?

Really, really easily – That’s how.

  • Download “MAMP“. Install it in the “Applications” folder.
  • Download the latest version of “WordPress” (at the time of writing, this is 2.6.1 ).
  • Unzip the downloaded file and place the unzipped “wordpress” folder in: Applications > MAMP > htdocs.
Wordpress Install Path

Wordpress Install Path

  • Open the MAMP application and start both the Apache Server and the MySQL Server. Click on the “Open Start age” Button or alternatively point your browser of choice to “http://localhost:8888/MAMP/“
Wordpress MySQL Page

Wordpress MySQL Admin Page

  • Create a new database. You may call it whatever you want but for simplicity’s sake I entitled mine “wordpress”.
  • Now you go to: Applications > MAMP > htdocs > wordpress > wp-config-sample.php and open that file in your favourite plain text editor. Edit the details to the following values and save the file as “wp-config.php”.

define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASSWORD', 'root'); // ...and password
define('DB_HOST', 'localhost:8888'); // 99% chance you won't need to change this value

  • Now, point your browser to the install.php script. Follow the onscreen instructions and remember to jot down the admin password so you can log in in the next page.

And that’s it.

I’m off for some lunch.