Are you looking forward to setup up your self hosted blog? Click Here now!!

How to Install WordPress Locally on Mac Using MAMP

by Harsh Agrawal on September 28, 2012

When it comes to windows, there are many ways we can install WordPress locally, for example we can use standalone software like Instant WordPress or installed WordPress using XAMPP, but when it comes to Mac we have limited option. Recently, I purchased a MAC book Air which is now running OS X Mountain Lion 10.8.2 and since I find it very useful to have a local WordPress installation to write tutorials and to try out new things, finally today I decided to get a local WordPress environment for me. This tutorial will be helpful for people like me and you, who loves WordPress and planning to get a Local WordPress installation on MAC system.

Preparing for WordPress installation on Mac:

To get started with Local WP installation, we need to download MAMP and WordPress. Download links are given below:

Along with this you need to do few editing in Wp-config file and need to create a database via phpMyAdmin, which is very easy. Make sure to take advantage of Sticky notes app in mac to copy the details.  MAMP is a software to create a personal Web server on your local system and they offer a pro version too. Though, for our purpose a free version of MAMP is good enough to get started. Sadly, they don’t let download just the free version so total size of downloading MAMP would be close to 150 MB.

Install WordPress on Mac : A Complete DIY Tutorial

So, once you have downloaded MAMP, install it like any other Mac software. If you are new to mac, you can check out this video to learn to install app on Mac system.  Once MAMP is installed, open Mamp and start the server to check if it’s working fine or not. There are few configuration settings also offered by this app and you can configure it too. For example, cache type and Port number. You should set the MAMP port to default apache and MYSQL port <Via> Simply go to MAMP preference > Ports > Set to default Apache and MYSQL ports . See the screenshot for details:

MAMP default port How to Install WordPress Locally on Mac Using MAMP

Sometime MAMP gives error when starting and it usually happens because of Port clash with some other apps like Skype. Simply change the port number in Skype or MAMP and it will work fine. Now, on MAMP screen click on Open start page and click on phpMyAdmin and click on Database to create a new database.See the screenshot to easily understand the process.

create WordPress database from phpmyadmin How to Install WordPress Locally on Mac Using MAMP

I have used sml_wp to create database and you can use anything according to your wish. Just remember the name of the database as we need it later for complete WordPress configuration.

Now, you need to unzip WordPress file which you can have downloaded and go to Applications > MAMP> htdocs and copy the files from WordPress folder. See the screenshot:

unzip Wordpress to htdocs How to Install WordPress Locally on Mac Using MAMP

Finishing WordPress mac installation:

So far, you have installed MAMP, configured it and unzipped WordPress folder to Mamp. Now, we need to make little changes and we wil have WordPress running on Mac. Now under htdocs, simply rename the wp-config-sample.php to wp-config.php And open it to enter database details and user detail.

Open Wp-config.php and add the following details:

  • Db name: Database you created. In my case : sml_wp
  • db_user: root
  • db_password: root

Here is a screenshot of my wp-config file after editing:

edited wp config How to Install WordPress Locally on Mac Using MAMP
Now save the file and in your browser type http://localhost and it will bring WordPress Install screen. Simply give a site name, admin username and password, Email address and click on Install WordPress.

Install WordPress on Mac How to Install WordPress Locally on Mac Using MAMP

That’s it and now your WordPress local blog is set up on Mac. Now you can always add theme by directly accessing htdocs/wp-content/themes under MAMP folder on your Mac. So go ahead and enjoy using WordPress on your Mac OS and if you still have any questions about it, feel free to let me know via comments.

If you enjoy this tutorial, don’t forget to share it on Facebook and Twitter. Do join us on Facebook for more such guides.

 How to Install WordPress Locally on Mac Using MAMP
I'm a WordPress lover and using WordPress in my day to day blogging life. Here at WordPress Tutorial blog, I talk about various WordPress tips, plugins and hacks which any WordPress blogger will be needing it. Subscribe to stay tuned with latest update.
4899cd9554a5fa034970a48d27b34a08delicious

Subscribe to receive Free Wordpress Blog Setup Tips

  • We will send you latest SEO tips, hacks and tutorials to make most out of WordPress.
  • You will also be receiving latest WordPress news, Theme releases, WordPress upgrade notices.

2 Comments

{ read them below or add one }

Trista November 13, 2012 at 9:44 am

Once I got to the step to type http://localhost into my browser, I only got the default ‘It works!’ window rather than a Wordpress Install window.

Reply

Trista November 13, 2012 at 9:56 am

Just answered my own question by stopping my local Apache. Thanks for the help! This tutorial was great!

Reply

Leave a Comment

Previous post:

Next post: