Introduction
An interesting but often overlooked feature of an Apple Mac is that it comes bundled with a fully functional copy of the Apache web server and PHP - the language of WordPress. Add a MySQL database server to the mix and you have a fully functional, but personal, web server where, like me, you can test your website and write and debug code without ever exposing it to public view.
Partly because I have to rebuild my machine from time to time and I can never remember all the steps and partly because it may help someone else out there, this tutorial walks through all of the tasks and processes necessary to get a copy of your WordPress site running on your iMac or MacBook. In fact, it will show you how to get multiple sites up and running.
It is not complicated once you know all the things you have to do and it may not be the only or best way of doing it - but it has worked for me for a couple of years.
Two points before we start however. Firstly, this tutorial is strictly aimed at OS/X Leopard (10.5). Things were different on Tiger and different again on Panther. Secondly I am a self-confessed dummy when it comes to using the Terminal. So as much as possible - I don’t.
This tutorial is also aimed squarely at those, like me, who are not masters of web servers. You guys know what to do already!
I have broken this tutorial up into several pages and will start with Apache.
Next: The Apache Web Server
Awesome tutorial! I will definitely be using this once I get upgraded to Leopard on my Macbook Pro.
Thanks so much!
gracie
Hope it all works for you when you try it.
This is a very clear and concise instructional piece and a handy reference for many things, not just web services.
I would recommend though, one piece of software, for future installs:
MAMP (MacOS, Apache, MySQL, PHP) a complete software install and management package developed for fellow novices, for just this purpose.
The folks at http://www.mamp.info have done a superb job of implementing all of the tools you explain here, in one easy to install, easy to remove package.
The Freeware MAMP and the ShareWare Mamp-Pro both provide complete packages for Mac-philes who want to host demo (or full fledged) websites locally.
Some of the tips you provide here are also, very useful in a high end production environment available with Mamp Pro hosted on a MacOSX platform. I even use it to host some client sites locally, and with your tips, have been able to provide better services for my clients.
The problem I had with using MAMP (and maybe I was doing something wrong of course) was being able to access the mac based web server from other machines on the network. It’s possible that when I tried I didn’t update the hosts file (it was a long time ago) but it was at that point I gave up with MAMP and went the kosher route!
There are some big differences in using MAMP, and the native installed apps in MacOSX.
First and foremost, all of the files needed reside inside the MAMP folder inside your applications folder. (this makes a breeze to remove, just relocate the MAMP folder.)
Secondly, all of those files are visible, by default, in the finder.
As for using the etc/hosts file to redirect to individual folders inside MAMP’s htdocs folder, there are two routs to go locally, MAMP (freeware) requires that you edit the files manually in the MAMP/etc/ folder, whereas MAMP-Pro (Shareware) uses a control pane in it’s interface.
MAMP-Pro also uses one of the free dynamic IP interfaces to publish dynamic domains which in turn to your internet IP, and then in MAMP, point to these new sub-folders.
In either version, if you only want to make the sites accessible on your intra-net, you can update the hosts files on the individual computers on the network, or if your router allows it, create host records on the network’s routing tables. (My Linksys allows for this as well as one of my client’s NetGear Router)
This simplifies the task of updating all the computers HOSTS files on varying systems and platforms and puts the routes in one place.
Useful info - thanks. Might try this next time around.