Skip to content

Connecting to MAMP in Windows using Parallels on a Mac

I use MAMP for running Apache, MySQL and PHP on the Mac. A simple click and all 3 are up and running in 5 seconds and you can easily configure your ports and root folder.

However, I was having trouble accessing my MAMP server through Parallels. I use Parallels to test my sites on Internet Explorer and it’s pretty important that I’m able to do this in development before going live.

I found this excellent solution from Tim Fletcher and thought I’d summarize it below so you too can get testing your Wordpess, CodeIgniter, PHP sites etc. through Parallels.

1. Install Bonjour for Windows

Download and install (in your Windows OS) Apple’s Bonjour For Windows.

2. Enable file sharing

Now back in Mac OSX, enable file sharing. System Preferences > Sharing > File Sharing.

File Sharing

3. Change your computer name

From the ‘Sharing’ window you have open, change your computers name to localhost.local.

Computer Name

4. Change your Apache and MySQL ports in MAMP

Run MAMP and open up ‘Preferences’. Change the Apache Port to 80 and the MySQL Port to 3306

Ports

N.B. Make sure there are no other instances of MySQL running.

5. Configure your framework

Change the settings on your framework to reflect the new settings.

The example I’ve used here is WordPress. Change your WordPress address (& blog address) to http://localhost.local (Settings > General).

Settings

Volia!

You should now be able to access your site from your Parallels Windows environment using the URL http://localhost.local and you can test your site in IE.

Want to read more?

Psst! We're hiring an Interaction Designer at Kareo. Click here if interested.

Photo of Lee Munroe

Written by Lee Munroe.

Follow @leemunroe on Twitter for more articles on UX design.


18 Appreciated Comments

Add your comment

  1. Soheil Alavi says:

    What a Coincidence, I was looking for a way so that I can test my website on IE using parallels, after I come up with a solution, you post an article here, but seems my way is easier ;)

    What I have done is I just went to my network connection setting and took my IP address on MAC, So instead of http://localhost , I typed my IP address and then Woof, everything is working fine, just you have to change your wordpress home address to that IP address as well instead of localhost.

  2. Lee says:

    Nice one Soheil! I’ll have to check that out. Cheers

  3. datenkind says:

    I do it the same way as Soheil. Just use the hosts (OS X) IP as address and it works fine. :)
    Oh, and I’m using Fusion btw, so it makes no difference.

  4. Darren Cassidy says:

    Got through your instructions (the original article is no longer available, BTW). Up until step 5. How do I “change my framework”? in OSX? in Win? in Parallels?. Where do I go to do step 5?

  5. Lee says:

    @Darren: You would do this via your WordPress admin area in OSX. Let me know if you’re able to get it sorted

  6. Darren Cassidy says:

    I don’t even have WordPress. I added MAMP’s htdocs folder to my file sharing and still can’t see my phpinfo() page in IE.

  7. Hugo says:

    Any idea for exactly the reverse thing?

    I have a ASP.NET website running in Windows (through Parallels 4) and I want to test it over the Xcode iPhone Simulator that only runs on the Mac “side”.

    Thanks!!

  8. Lee says:

    @Darren: Not sure mate. Possibly try editing your http.conf file (ServerName). Try http://www.experts-exchange.com – you might get a better answer there.

    @Hugo: No idea I’m afraid. Not even sure if that’s possible.

  9. Hugo says:

    D’oh!

  10. Alan says:

    You saved me a lot of time :-) thanks a lot! it even works with other computers on the same network, just installed Bonjour on them as well and it worked

  11. tim says:

    Wow – simple sweetness!

    I am using CI, MAMP and fusion. I wanted to have an IE browser open for testing.

    I skipped steps 3 and 4, and used my current computer name in CI config settings. Works like a charm.

    thanks

  12. Daniel says:

    Excellent, many thanks for the post – worked perfectly with MAMP and VirtualBox.

  13. Guy Moorhouse says:

    Excellent stuff Lee, thanks for documenting this. After three hours of banging my head against a wall, I come to your site and find the solution very clearly explained.
    Cheers!

  14. emilyf says:

    fabulous, work; thanks!

  15. nashville web design guy says:

    Worked like a charm. Thanks for the info. Local cross-browser testing makes life so much easier.

  16. Riccardo says:

    Hi Lee,
    I think I did something wrong :(

    When I changed the settings on my wordpress framework with the new http://localhost.local I lost everything…
    Opening mamp I can’t go inside my wordpress site but see ‘You don’t have permission to access /MAMP/ on this server.’

    Do you know how I can change the settings again and bring them again to http://localhost:8888/wordpress?

    Thanks,
    Riccardo

  17. cisdevry says:

    Excellent instructions. It worked.

  18. Zack Katz says:

    The problem for me with the simpler solution (using the IP address) is that I don’t like looking at its ugly structure. I much prefer `localhost.local/wordpress/` instead of `192.xxx.x.xxx`