Developing for WordPress on a Macintosh

I’m helping a local church redesign their website. Since they are not programmers I thought the best approach would be to use wordpress so they can easily update the site. To develop the site I wanted to use my mac and this is how I set it up. Download XAMPP and WordPress. Install XAMPP, just use the installer, it makes it simpler. XAMP installs into your Applications directory and this is the only place it can be installed.

XAMPP stores the web site in the htdoc folder, but I wanted my development sites in my Sites folder, so I had to do a little tweeking. You just need to use virtual hosts to point to you dev site. In the httpd.conf file change the DocumentRoot and the Directory  to “/Users/<your name>/Sites and uncomment the Virtual Hosts include. 

Open the httpd-vhosts.conf file and add the following:

<VirtualHost *:80>
DocumentRoot “/Users/<your name>/Sites/wordpress”
ServerName <site name>.localhost
</VirtualHost>

Now one last thing, you need to change your host file so you can access you site with <site name>.localhost. You’ll need to add something like this at the end of the file:

## Custom 
127.0.0.1  <site name>.localhost

This makes it nice because wordpress like to be in the root directory. 

Copy the wordpress folder to you Sites folder and your ready to go!

Advertisements

One thought on “Developing for WordPress on a Macintosh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s