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 than 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 Bonjour, 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
(since writing this article Google registered .dev .localdev.dev
as top level domain, TLD, so you shouldn’t use .dev
) or follow Chris Coyier’s 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.
- Update both the URL’s in the Settings > General from
surfthedream.local
->surfthedream.localdev
- Update the MAMP URL from
surfthedream.local
->surfthedream.localdev
and restart the servers - 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.
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
This is the same situation I’m in… I can find several articles talking about .local – but not a single example on my machine… Gaaahhhhh!
Did you ever find the answer?
Do you have the options to update this field?
https://uploads.disquscdn.com/images/de3864978e73640e9a4d64846f1111cac20eff02ce2c883f329b7cbccea54c3b.jpg
No, I am using the free version. Is that screenshot from Mamp Pro?
Have since got rid of mamp and moved to using VVV (Varying Vagrant Vagrents) which seems to be a solution.
Thanks for doing the image though!
If you have the free version, can this be done from the mamp folders in finder?
Not sure, but the other option is to use Local from Flywheel
I cannot edit that field :( anything I type gets ignored
Got the same question! where do I change the MAMP URL??
https://uploads.disquscdn.com/images/de3864978e73640e9a4d64846f1111cac20eff02ce2c883f329b7cbccea54c3b.jpg
.dev should not be used, use .test or something because .dev seems to be a official domain ending