Menu

Magento Local: MAMP or Vagrant – 28 Blogs Later, Day 5

I’ve been struggling for days trying to get a Magento installation running on my local machine. I’ve used MAMP and Vagrant and I still can’t get it done. Self-evident disclaimer: much of the problem is user error. I’m terrible at this. Hopefully this message in a blog bottle will reach someone and help me find some answers.

My Google-fu is not so strong with this one. I’m usually pretty solid at Googling to find answers, but this time I’ve been coming up empty. I find articles and tutorials, of course. I just can’t follow them correctly or they don’t apply to my situation. Or I derp out.

Magento Local: MAMP vs. Vagrant.

Allow me to take you on a journey through my Magento local struggles. On your left, you’ll see MAMPtown and up ahead on the right is Vagrantville. Neither has been hospitable to me as of yet. The locals are a prickly bunch. Best we keep moving.

MAMPtown: population you, bro.

I run MAMP all the time. I develop WordPress sites locally on the regular and I run a revenue tracking/forecasting tool for my contracting income. In my limited experience, being a humble front-end dev, MAMP provides the smoothest “I need to make a website on my computer” solution. As server-y stuff goes, I’ve found it pretty simple and easy to use. So MAMPtown was the first stop on my Magento local tour. It didn’t go so well.

For one thing, I was told that Magento requires its own root domain—something like http://127.0.0.1—and therefore http://localhost/MAMP/Magento/ won’t cut it as a local testing URL. So immediately, I’m in Virtual Hosts Village.  Now is when we get back to user error. I couldn’t get past the vhosts step. I kept getting OS X/Apache’s default “It works!” page. The MAMP train is completely derailed.

I stopped and asked for directions but the locals weren’t very helpful. I asked this guy but he wanted me to set up a partition in Disk Utilities.app. No thank you. I’m sure there’s a good reason for it, but I’m a rookie and this is beyond me. Bail city.

Next, I asked this MAMPtowner and didn’t get any further. I got all the way to Step 6 before I realized I had no idea how to work with the Magento config files. I’m sure some hardened Magento dev out there is scoffing at my ignorance, but too bad. I’m stuck.

Lastly it was onto your friend and mine, Stack Overflow. No dice there either. The answers assume a certain level of understanding and I just don’t have it. Strike three. Time to try something else.

Later, MAMPtown.

Next stop: Vagrantville.

At the suggestion of a colleague, I took a shot at a Magento Vagrant combination. As new as I am at Magento, I’m even newer at Vagrant and VMs in general. Just not my thing. But, colleague found a Vagrant/Magento setup and tested it for me. On his advice, I gave it a try.

I got pretty far with Vagrant. The installation took about an hour because I neglected to skip the demo data. But once the demo data was installed I was able to view a demo Magento store at 127.0.0.1, running on my new Vagrant VM. “Hooray!” I thought to myself. That may have been premature.

Now the challenge is to somehow ditch the demo store and swap in my existing store. Oh I didn’t tell you? Yea, I have a Magento codebase repo pulled down from bitbucket and I have a database .sql.gz file provided to me. And that’s it. I swapped out the demo code/files for the bitbucket files. On refresh, my demo store was gone (yay!) but now I have a Magento installation guide (damn).

Magento Local: Install screen.

I have absolutely no idea what to do with this. I tried a few times to complete the install but I kept hitting brick walls. PHP error this. Missing config setting that. Blah blah blah, this is going nowhere.

Now arriving: Welcome to Redditnation.

By this point, it’s past dinnertime on day 2 and I’m getting desperate. I turned my old friend Reddit for some help. Many, many thanks to the weary Redditors of /r/Magento for taking the time to help me. I’m still not 100% but I’m making progress and gaining confidence.

Reddit Magento community.

My last (I think) hurdle is getting the provided database into the Vagrant install. Still working on that one. Further bulletins as events warrant.