Skip to content

Instantly share code, notes, and snippets.

@robwilliams
Created July 16, 2011 16:24
Show Gist options
  • Save robwilliams/1086509 to your computer and use it in GitHub Desktop.
Save robwilliams/1086509 to your computer and use it in GitHub Desktop.
How to install Wordpress on OS X

How to install Wordpress on OS X

There are simpler installers (and most probably guides) that will give you wordpress functionality on os x but if you want to get your hands dirty and do it yourself then read on.

Note: Whenever there is a line that starts with a $ you have to type the command into your Terminal (Found in your Applications folder) omitting the $.

Setup

A standard OS X install contains versions of Apache and PHP but not MySQL.

Apache and PHP

Apache (your webserver) needs to understand how to handle php code /private/etc/apache2/httpd.conf you can do this using the terminal like so:

$ sudo nano /private/etc/apache2/httpd.conf 

Find the line: (ctrl+wphp5_moduleenter)

#LoadModule php5_module        libexec/apache2/libphp5.so

Remove the # symbol to uncomment it.

Press ctrl + o to save.

Apache needs to then be restarted to reflect these changes, open system preferences go to sharing and untick and retick web sharing.

MySQL

To install visit http://dev.mysql.com/downloads/mysql/ and download either the 32 or 64bit dmg and follow the instructions choosing the defaults (leave the root password as blank).

After it's installed you will have to create a database for wordpress to use.

Log in to the mysql console:

$ mysql -u root

Create the database:

> create database wordpress;
> exit

You are now ready to install wordpress in your home directory.

Download wordpress from http://wordpress.org/download/ and unzip into Sites/wordpress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment