Leverage Branding Triangle Email Icon Map Marker Icon Twitter Icon Instagram Icon LinkedIn Icon Facebook Icon Pinterest Icon Brand Strategy + Planning Icon Print Icon Digital Marketing Icon Search Icon Events Icon Social Icon eCommerce Icon Design + Development Icon Video Icon
Development

Local WordPress Multisite (via MAMP Pro) Tutorial

Headshot of the Author Drew Hagni

Prerequisites:

  • WordPress (intermediate knowledge)
  • MAMP (basic knowledge)

Required tools:

  • MAMP Pro

If you’ve ever worked on a project that required the use of WordPress Multisite you likely know how much of a hassle it can be to manage, especially locally. If you’re using MAMP Pro for local development, we’ve outlined a few simple steps to get your WP Network up and running.

Step 1: Set up Local WordPress

Open up MAMP Pro and create a new host. I typically prefer to create an empty host, download WordPress via CLI wp core download and handle the database config manually.

Make sure to click “Save” so that MAMP can do its thing and then navigate to the local address in your preferred browser.

Step 2: Set up a Multisite Network

We’ll be following WordPress’ documentation for this part, but I’ll outline the basic steps here as well. Firstly, you’ll now want to open up your local site directory in a code editor of your choice.

Navigate to wp-config.php and add the following line: define( 'WP_ALLOW_MULTISITE', true );

Refresh the dashboard in your browser and you should see a new menu item “Network Setup” under “Tools”. Navigate to it.

Select “sub-domains” and click “Install”.

Copy and paste the values provided here to wp-config.php and .htaccess respectively. Once saved, refresh the dashboard in your browser and you’ll be prompted to log in once more.

Step 3: Set up Subsites

With a WP Network in place, you should now see some new menu items in your dashboard. Navigate to “Sites” and create a subsite of your choosing.

And lastly for some additional MAMP configuration. Create a new host in MAMP with the same address as the subsite (ex: test.multisite.local) and choose the same directory as the main site.

MAMP will warn you that you’re using the same directory as another host, but that’s fine.

Click “Save” and you’ll likely receive an error from MAMP this time. Go ahead and click “Ignore and Restart Servers”.

You should now be able to access your subsite at your desired address as well as its dashboard. Your local directory will contain the network’s codebase where you can begin development on your shiny new project!

How can we help?

Start A Project

Practical Tips for Using AI on a Daily Basis

I use AI almost every day. You can do crazy stuff with artificial intelligence — we generated an AI Christmas card for our team (shoutout Drew for nerding out on some hardcore stable diffusion software to create this from scratch)....

Read More