Magento – Local Development on Macs – File Case Issues

I mainly work locally on my Mac. I’ve got a nice LAMP setup, and I love it. Over the last month or two, I’ve run into a couple of file case issues, and we just ran into another one last week, so I figured it was time to address it.

Macs are not case-sensitive. Linux machines are (I think Windows machines are, but I’m not sure.. I avoid use of any Windows machines). So, while I can have a Magento site up and running and working great on my Mac, when I transfer it to the live server running on Linux, things can break if I’m not careful.

Here are a couple examples of issues that we have run into:

Product Image Issues: We ran a product import, which included product images. Everything looked great locally, but when we deployed it to the server, there were loads of missing images. The problem was the case of the image names. There were many discrepancies which the Mac didn’t care about, but on the server, it didn’t match up.

Module Issues: We’ve had a couple different issues with this, but to point out one specifically: One of my block files in the module I was working on was supposed to have a capital first letter of the file name. I ended up creating it with a lower case letter. Again, this worked just fine on my Mac, but when pushed to the server, it was creating odd issues that we couldn’t figure out. There were no errors being thrown to point it out, there was just missing data that was not being displayed on the website. It took a while to figure it out, but I changed the file name back to a capital first letter and then it worked fine.

So, if you are developing locally on a Mac, definitely keep this in mind. I am heavily considering creating a VMWare image of Linux, and running Apache on that for local development to catch any of those issues and not discover those once the website is pushed to the live server.

This entry was posted in Magento. Bookmark the permalink.

3 Responses to Magento – Local Development on Macs – File Case Issues

  1. Anatoly A. Kazantsev says:


    Here is my 2 cents.

    “Macs are not case-sensitive.” – As I know that’s not correct. You can choose case sensitive file system during MacOS X installation.

    LAMP stands for Linux/Apache/Mysql/PHP (as most popular set), so you can not have such setup on mac :-)

  2. Ben says:

    I’m on a Mac too and would highly recommend the VMWare approach for a couple of reasons:
    1. Getting the LAMP stack right – the fact that I can make different VM images for testing is great, the web hosting companies all have slightly different builds and this way I’ve been able to make a stack that emulates as closely as possible the production stack. In addition to case sensitivity things like file permissions/fcgi config/eAccelerator/suhosin/php & mySQL versions have all bitten me as I’ve moved Magento from my localhost to a production server, so having a stack that mimics the live site is indispensable.
    2. Backups, backing up whole machines and taking snapshots in VMWare is just awesome (just remember to exclude the VMs from Timemachine!) its great to even be able take a whole VM from my mac and put it on a clients local network.

    The downside of course is the disc space and performance issues – running the Mac host and a Linux guest is fine, but throw in a windows guest at the same time for browser testing and it gets a bit painful, I really could do with another 4Gb of ram….

  3. Jonathan Hodges says:

    You should repartition your hard drive using disk utilities and create a case sensitive partition where you store all of your development sites files. You can then use a vhost to point to these files for every site you set up on this volume. It takes care of the entire issue.