After years of foolishly working on my live blog for all types of changes I decided to take a leap of faith and install WordPress 2.x on my G5 at home to use as a development environment. I will probably do the same thing on my work MacBook Pro and abandon my local copy of MovableType since I am a WP guy. When I did the MT thing on my MBP I found some directions and ended up in the Terminal doing all sorts of things ... made me uncomfortable.
I have to give a tip of the hat to my friend and colleague, Chris Millet for introducing me to MAMP ... MAMP is this nice little app that gets MySQL, Apache, PHP, and the associated admin apps you need running on your Mac in no time -- as a matter of fact at the click of a mouse. Just download the thing, drop it in your Applications folder, double click the MAMP app (or fire up the included widget for use under 10.4) and you are but a click away from having Apache and MySQL Server fully installed and running on your machine. From there, installing WP was a dream. Here are the basic steps I used to get it running:
- Download MAMP
- Install MAMP by dropping the whole folder into my Applications directory
- Double click the widget in the MAMP directory (under 10.4.x) and it auto installed
- Flipped the widget over and set the radio button to PHP 4 -- this is done by running the mouse over the bottom of the widget to expose the little i button. Clicked Done and it flipped back over.
- Clicked "Start Servers" and the little lights glowed green.
- I then tried to click the "Open Start Page" button on the widget, but nothing happened ... if this happens go to the next step.
- Back in my Applications/MAMP directory, I double clicked the MAMP application and it opened.
- In there, I clicked the "Open Start Page" button and it opened a web page for me.
At this point MAMP is running and you are ready to install WordPress. To get WordPress running you do the following:
- Download WordPress
- While WordPress is downloading, go back to the start page MAMP opened for you and click the link at the top for phpMyAdmin.
- This is where you will set up a mySQL database to run WP on.
- In the phpMyAdmin page, under the Create new database box, type in a database name ... for this you can call it anything you want ... I named mine local_wp ... again, it can be anything.
- Take your WordPress files and place them inside the Applications/MAMP/htdocs directory.
- Open the wp-config-sample.php file and update it with the following (given you named your database local_wp) ... the thing that threw me for the first 20 minutes or so was adding that :8889 to the DB_HOST section.
- Rename the wp-config-sample.php to just wp-config.php and save it back in your Applications/MAMP/htdocs directory.
At this point you just need to point your browser to http://localhost:8888/wp-admin/install.php and finish out the process ... from here it is as easy as can be. So this should get you going in a few minutes with your own development environment on your machine. Talk about a killer personal content management system! At this point, you could install all sorts of other open source PHP based stuff in the MAMP directory to try out and tweak. I hope this helps!
MacOSX already ships with PHP4 and Apache installed and running. All you need to do is download the standard MySQL distribution from mysql.com, then you can install all the PHP goodness you like, without having to worry about :8888 or the like.
That's what I've done for local testing of WordPress, Drupal, and many other PHP apps.
MAMP makes it nice and clean in one app package, but most of the bits are already in place in the standard locations, without having to worry about another installation.
I have used MAMP to test PHP5 apps, which was a nice and easy way to get a PHP5 sandbox on my system without borking my PHP4 stuff.
For MySQL admin, I swear by CocoaMySQL - a totally awesome client app that lets you do pretty much anything with a MySQL database, without mucking about in a browser or in the command line...
Posted by: D'Arcy Norman | 08/19/2006 at 07:00 PM
I guess I should have mentioned that MAMP makes this all available to "the rest of us." I have gotten all the goodies going before, but it isn't the easiest thing for someone like me and it was a little scary actually. The MAMP thing is so easy and so straight forward it is actually something I would think just about anyone could make happen. The whole MySQL stuff my be a little tough, but even that is relatively straight forward. The other thing I like about MAMP is just being able to throw the whole folder away without it mucking with my system. I have no idea what I need to do to get rid of Movable Type.
Either way it gives you a chance to test out some killer apps and build a very nice little PCM.
Posted by: Cole Camplese | 08/19/2006 at 07:00 PM
OK, I've been enjoying the ease of MAMP and WP too, but how do I take my tweaked blog public from MAMP back to my internet server?
Posted by: Jeff | 08/27/2006 at 07:00 PM
Jeff ... you could do the real install with your webhost and then us the MyPHPAdmin to export your local WP database and import it to your hosted site. Make sure you have WP up and running at your host first.
Posted by: Cole Camplese | 08/28/2006 at 07:00 PM
thanks for the link
Posted by: andrew | 09/04/2006 at 07:00 PM
Hi, great site.
Is it possible to view the wordpress blog from another computer within your network. I am trying to get a LAN wordpress working either on PC or MAC... any ideas?
Posted by: Slix | 09/12/2006 at 07:00 PM
Slix ... you'll have to make sure you can leave the machine on and have some sort of webserver working. On the Mac it is fairly simple -- on the PC I have no idea. You can turn on personal websharing on the Mac to enable it.
Posted by: Cole Camplese | 09/12/2006 at 07:00 PM
THANK YOU VERY MUCH!!!
this test doesn't work. yours is better! ^__-
Posted by: ophy | 11/01/2006 at 06:00 PM
On the DB_HOST value on the config file, you need to set it to localhost:8888 instead of localhost:8889
Posted by: Matthew | 02/28/2008 at 06:00 PM