[Mac/ Linux] How to Install WordPress Locally

We just wrote a article about how to go about Install WordPress on a Windows Box Locally. And here we are again to help all you people having a Mac or Linux OS.

Without wasting more time lets get things done.

Here are the steps to Install WordPress Locally on a Mac or a Linux

  1. Install a local server (Mac: MAMP,  PC:XAMPP or  WAMP).
  2. Create a new database.
  3. Download WordPress from  WordPress.org and extract the files to a new folder under the  htdocs folder.
  4. Rename the  wp-config-sample.php file to  wp-config.php and update the database details according to your local server.
  5. Run  wp-admin/Install.php and follow the instructions to install WordPress.
  6. Done!

Let’s Begin…

Before you start, let’s look at the requirements to run WordPress:

  • php 4.3+
  • MySQL 4+ Database Server

 

1. Install a Local Server

 

In order to run any PHP/database application on a local computer, you need a local host (ie. Apache + MySQL). For Mac, use  MAMP. For PC, useXAMPP or  WAMP.

I’m using Mac here, so I’m going to install MAMP. Go to  mamp.info, download and install MAMP.

2. Create a New Database

After you’ve installed MAMP, run it and it should take you to the start page. Now click on phpMyAdmin. In the phpMyAdmin page, create a new database (eg.  WordPress).

 

 

3. Download WordPress

Go to  WordPress.org and download the latest build of WordPress. Go to the  htdocs folder (where you installed the MAMP), extract the wordpress.zip to a new folder (eg.  mysite).


4. Update wpconfig.php File

In the folder, rename the  wp-config-sample.php to  wp-config.php. Open  wp-config.php and update the database details (db_name, user, password, host) according to your local server.

5. Run install.php

With your browser, go to  http://localhost:8888/mysite/wp-admin/Install.php and follow the instructions to install WordPress.

Dhawal D