Developing on a Powerbook

Last spring we decided that my wife’s old Dell Latitude from 1996 just wasn’t cutting it any more so it was time to shop for a new laptop. I saw this as a great opportunity to make a bit of a change. My primary computer is also a Dell but with all of the software I own its not practical for me to make a switch at this point. So you can probably guess what happened.

We ended up with a shiny new 15 inch Powerbook G4 and I had a new home browser test lab. Until a couple days ago I hadn’t gotten much of a chance to play around with it. With a trade show for her business coming up tomorrow we wanted to be able to demo the website at the booth. But with no internet connections available in the building was the only solution.

In a matter of a couple hours, I had the Favorable Designs website running locally on the Powerbook are we’re ready for the show tomorrow. Being a relative newcomer to the world of developing on a Mac, I thought this might help some folks out there looking to take the plunge. So here’s what I did to take the my live Textpattern site and set it up locally.

  1. Install MAMP – I remembered from reading online hearing of 2 PHPApacheMySQL installs used for Mac and MAMP was one of them. XAMPP was the other but I remembered hearing more about MAMP. It was an easy albeit large download. But all it took was a drag into the Applications folder and my Apache and MySQL servers started themselves up. The final step was to change Apache and MySQL to run on their default ports (80 and 3306 respectively) instead of MAMPs defaults of 8888 and 8889.
  2. Get a database backup – I used my rss_admin_db_manager plugin to generate a backup but you can also use phpMyAdmin or any other tool of your choice.
  3. Restore the database locally – MAMP includes phpMyAdmin so I used that to create my database and user and then loaded up my database using my backup script.
  4. Download your live site files – In need of an FTP program that would allow me to download my site I found Cyberduck, an open source FTP and SFTP client for OS X. It has a simple interface and allowed me to easily connect to my host and download my files. I then dropped these files in the /Applications/MAMP/htdocs directory.
  5. Change your config.php – I kept my database name, user and password the same so the only thing I had to change was my ‘txpath’ setting. Once that was complete I pointed my browser to http://localhost/textpattern and logged in to the admin interface.
  6. Change directory and site paths – I next change my site URL and my temp and file upload folder paths to match my local directory structure. In this case it was /Applications/MAMP/htdocs/textpattern/tmp.
  7. The .htaccess file – Apparently a problem in older version of MAMP but not the new one I downloaded was a lack of mod_rewrite support which I needed for my clean URLs. Once I realized that I noticed that I couldn’t see my .htaccess file. After some quick Googling I realized that its not as easy to see hidden system files on a Mac as it is on a PC so I needed to download TinkerTool which allowed me to unhide hidden files and copy my .htacess into my htdocs directory.
  8. View your site – I chose to install the site at the root of my local apache install so I just had to nagivate to http://localhost and my site came up like a charm.

In the end I was impressed with how easy it was to set things up on the Mac. I’ve developed locally on my PC for years so I had some familiarity with the process but I still had to download a whole new suite of tool. I’d be interested to know what veterans of Mac development have to say about my choices but all is well on my end and ready for show an tell tomorrow.

Comments

14. January 2006

Thanks for the info on MAMP, I’ve been muddling my way through MySQL and PHP installations/upgrades on two different Macs; MAMP certainly seems a lot more convenient.

Regarding the hidden files: BBEdit lets you browse and edit hidden files using its “Disk Browser” feature. Also, a good FTP program like Transmit will let you move these around as well (even locally).

Alannie

16. January 2006

> In the end I was impressed with how easy it was to set things up on the Mac

Yes Mac softs are usually built to make people’s life with computers much more friendly and intuitive. I was lately impressed by CssEdit. Design with css at the speed of light.

17. January 2006

I will echo Alanie’s push toward Panic’s Transmit which has won awards for its UI and usability. Glad to see the switch went well for you. I’m on the same G4 and lovin it.

These are still computers, and thus destined to frutstrate at times, but possibly less so than your average dell.

Enjoy.

Add a comment

You may use textile in your comment. Gravatars are enabled. Your email will not be displayed and will remain private. I reserve the right to edit or delete comments.





Textpattern Solutions

Textpattern Solutions

Textpattern Solutions is the first book published on Textpattern.

details at friends of ED or the official book website.

buy it at amazon.com