Tuesday, October 07, 2008

Wordpress, MAMP, Drupal, LAMP--Linux Is Easier Than Mac

I was very taken with the idea of MAMP: One-click solution for setting up your personal webserver. MAMP is installed in the typical Mac fashion: very easily. MAMP will not compromise any existing Apache installation already running with your OS X. You can install Apache, PHP and MySQL without starting a script or having to change any configuration files! Furthermore, if MAMP is no longer needed, it is sufficient to delete the MAMP folder and everything returns to its original status (i.e. MAMP does not modify any of the "normal" OS X).

I really liked the idea that I could install a CMS, play around with it, and just dump the whole database and loalhost content if I messed it up. I thought it would be easiest to start out with Wordpress, rather than Drupal or one of the digital library CMS's, because so many people use Wordpress successfully. It must be easy, right?

Well, it didn't work that way. I installed MAMP successfully, I thought, but I couldn't get Wordpress to communicate with the MySQL database. Eventually, I gave up and turned to my Debian desktop, where I installed the usual LAMP setup. Drupal worked almost right "out of the box." The only problem I had was that I had an old version of Apache 1.3 installed, from my efforts to configure a network file system (NFS) back in March. Once I removed that and reinstalled Apache 2, it was a cinch to install Drupal on localhost.

This gave me an idea--I thought I had turned off all the network services in the Mac "System Preferences: Sharing" window, but when I poked around a bit more, I found "Apple Share" turned on. Once that was turned off, Wordpress installed easily on MAMP's localhost:8888 just as advertised. Here are a couple of resources that helped me with the Wordpress/MAMP install.

So, it probably would have been easier to start with Drupal in the regular /var/www directory for localhost on the Mac. Here are the directions I found helpful for that process.

Guides to a "Full-blown" LAMP setup for Mac OSX Leopard

  • Installing WordPress On Your Apple MacAn 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.
  • Leopard: How to Install Wordpress also details adding MySQL, turning on PHP5, installing your CMS of choice (Wordpress again), and running localhost.

1 comment:

Larry said...

Sometimes it can be difficult to convince WordPress to communicate with MySql. I use MyPhpAdmin as an interface with the database, as I'm a database novice, and the web-based tool has served me well.

I tried to install Drupal once but never could get it to work, but you might have better luck!