How to Install and Test WordPress on Your Mac

WordPress is without a doubt the most popular blogging platform around. Not only is it a good piece of software but what makes it the best tool for the job is the awesome community that is associated with development of not only the WordPress core software, but also the various themes and plugins.

For all it’s simplicity, a lot of people still shy away from using WordPress because installing and maintaining it requires a certain level of technical knowhow. Specifically, the knowledge of installing and managing a PHP/MySQL stack and dealing with all the problems that can happen with a botched WordPress installation.

So, without further ado, we’ve written this post that’ll not only teach you how to install a complete PHP/MySQL stack on your Mac but also teach you to install and configure a fully functional WordPress install, all without leaving the comforts of your own computer.

MAMP, which stands for Mac-Apache-MySQL-PHP and is an all-in-one solution for people who do not want the hasle of installing and configuring the individual components on their system.

Follow the download link on the MAMP site to get hold of the latest DMG image and double click the image to mount it in the Finder. The download is a bit heavy at about 170 MB but it will be totally worth it … trust me.

MAMP Install

One of the best things about OS X is the ease with which software can be installed. To install MAMP in your system just drag the MAMP icon to the Applications folder.

Double click the MAMP icon to launch control panel.

start MAMP

MAMP will automatically start the Apache web server and the MySQL database server and also launch an instance of your default browser to tell you that everything is working fine.

Keep this window open – We’ll need it in a while.

mamp welcome page

MAMP also bundles a version of phpMyAdmin along with the complete PHP/MySQL stack.

phpMyAdmin is a web based software to manage MySQL databases and we’ll use that to create a database for our WordPress install.

Click on the phpMyAdmin link in the browser, and when it loads up in your browser, give a name for the new database and press the Create button.

MAMP phpMyAdmin

That was probably the easiest MySQL install I’ve ever done.

Now that we have all the infrastructure in place for WordPress, head over to the WordPress website and download the latest version of the software.

Unzip the file that you just downloaded into the htdocs folder inside the MAMP folder – /Applications/MAMP/htdocs.

mamp htdocs

You should now see a wordpress folder inside htdocs. Browse to this folder and open the file named wp-config-sample.php using a text editor.

In this file, find the lines which say:

‘DB_NAME’ – replace ‘putyourdbnamehere’ with ‘the name of the database that you created’
‘DB_USER’ – replace ‘usernamehere’ with ‘root’
‘DB_PASSWORD’ – replace ‘yourpasswordhere’ with ‘root’

Wordpress Install

Save the file and rename it to ‘wp-config.php’ from ‘wp-config-sample.php’.

Now, open this address in your browser – http://localhost:8888/wordpress/wp-admin/install.php.

Follow the wizard and at the end of it, use the temporary password that the wizard created for you to login to your shiny new WordPress Install. That’s it ! You now have a fully functional WordPress install on your computer to play with all the themes and plugins that you want.