Using WordPress multisite with MAMP Pro and subdomains

Image of WordPress logos with Mamp logo

If you’ve ever tried setting up a WordPress Multisite network locally using subdomains, you’ll know it’s not always straightforward – especially if you’re working with MAMP Pro.

I’ve set up Multisite environments a few different ways over the years, and while subdirectories are easier, sometimes subdomains are the better (or only) option, especially if you’re mirroring a live setup. In this post, I’ll walk through how I configure WordPress Multisite with MAMP Pro and subdomains, including a few tips to avoid common issues.

Getting started

This is a quick tutorial on how to run WordPress Multisite with local subdomains using MAMP Pro v5.3.

Scenario: You have an existing WP Multisite you want to set up locally so you can work on it. Your main site is www.catsarethebest.com. Then you have some other sites attached such as blog.catsarethebest.com and shop.catsarethebest.com and you want to have subdomains working locally too.

Set up your host first

You’ve got your WordPress files ready in a directory, and your database in your local phpmyadmin, you just need a local domain to run it from. Let’s say you want to set up catsarethebest.local

Run MAMP, then click the little + icon (see below) and create a new host. Go through the set up prompts.

Visit your local domain (catsarethebest.local) and check that your WordPress site is running as expected.

Once you have your WordPress site with multisite set up, we want to add the subdomains. These would be blog.catsarethebest.local and shop.catsarethebest.local

Use aliases

If you try and set up your subdomains in the same way as the first host in MAMP, it won’t work. This is because MAMP will only let you use the same destination folder once.

Instead we want to create aliases. You can see where I’ve done that in the screenshot below.

Aliases in MAMP Pro 5.3

Setting subdomains in Network admin

Once you’ve done this, you’ll need to make sure the subdomains are set correctly within WordPress.

You’ll find these within your WordPress menu. Go to My Sites > Network Admin > Sites

In here you’ll see the sites you want to set the subdomain for (or perhaps you need to set them up if you haven’t already). Just ensure the Site Address (URL) is set to the local subdomain you set up. See below.

Now when you visit your subdomain, you should be able to see the website for that particular site!

Any questions?

Getting WordPress Multisite running locally with subdomains takes a bit more setup than a standard install, but once it’s configured, it saves a lot of time during development and testing.

If you’re working with a complex WordPress setup, or need a hand configuring environments that match your live infrastructure, I can help. From custom Multisite builds to staging workflows, I make sure your setup works smoothly and scales with your project.

Get in touch if you need help setting up, fixing, or streamlining your WordPress environments.


Leave a Reply

Your email address will not be published. Required fields are marked *

Let's talk

Whether it’s a small step or a giant leap, I’m here to guide your project.

Make contact