Surf the Dream A discourse of links and articles from Justin Avery

My local wordpress MAMP site slow

While I was on the train ride home today I was writing an article on my local copy of wordpress when I thought to myself “This is actually slower then working with the patchy wifi and GPRS”.

The best thing about running your site locally is that you do not require an internet connection to make updates, especially great for train, planes and tube travel. The next best thing about it should be the speed! You’re not relying on the internet connection and you will most likely have a more highly spec’d laptop then you have on your shared server space.

Why are .local wordpress sites slower with MAMP?

The answer was quite surprising! It’s not that it is wordpress or that you are running MAMP, although the MAMP bit does have a knock on effect.

I use MAMP because I use a Mac and I always used Xampp before making the jump from PC to Mac in 2007. THAT is the key to why it’s slow. It’s not that it’s MAMP, but because you are running a .local site on your Mac.

The Mac OS looks at any .local domains to be part of Bonjur, so it has a whole internal battle before it realises what it should be doing. The fastest way to avoid this is to set your local sites to something like .dev (after all they are dev sites) or follow Chris Coyiers lead and have something completely random (he uses .whatup for his local sites, so you see css-tricks.whatup).

If you’re doing this then follow these steps for your WordPress site at least.

  1. Update both the URL’s in the Settings > General from surfthedream.local -> surfthedream.dev
  2. Update the MAMP URL from surfthedream.local -> surfthedream.dev and restart the servers
  3. If you’re running something like Migrate DB Pro as well to keep things in sync then you might also want to ensure you update the URL rewrites before you sync all your updates back up again too

Enjoy a faster site!!! I know I am.

  • Axel Hess

    Hi,
    can you please share where this is to be done exactly? When I open Settings>General I see “http://localhost:8888/foldername”, there’s no .local anywhere to be seen. And what do you mean by “Update the MAMP URL”? Please help me out…
    Axel Hess

  • Got the same question! where do I change the MAMP URL??

Surf the Dream is a blog that has been running since the mid 2000's when it started on BlogSpot. Over the years it's been rebranded as justinavery.me (now my resume) and JaveryDesign.com (which now redirects back to this site).

I offer consultation services through Simple Things, produce a range of educational pocket notebooks, write about the Universe and run a responsive design and a RWD Weekly Newsletter