Run WordPress Multisite locally on macOS with MAMP PRO app

Recently I have been working on a large project that required using the WordPress multisite. WordPress Multisite enables you to create multiple websites from a single installation, requiring only one database and one set of files for many websites. On my macOS devices I use MAMP PRO app by appsolute GmbH for local development and therefore I needed to get MAMP working with WordPress multisite and sub domains. In this tutorial, you’ll learn how to run WordPress Multisite with a MAMP PRO app.

Requirements

For this I am assuming that you have MAMP PRO app installed, and also WordPress installed and Multisite option already activated.

Knowledge needed: WordPress

Requires: WordPress, MAMP PRO, macOS (I use the version 10.12.5)

Let’s begin

Now, step by step guide.

Reset MAMP PRO ports

Firstly we need to make sure that MAMP PRO is using the default Apache and MySQL ports (80 and 3306 respectively). To do this, go to the “General” tab from the MAMP window and click the button titled “Set Apache and MySQL ports to 80, 443 and 3306“.

Edit macOS’s hosts file

The next thing to do is to edit your macOS’s hosts file. To do this enter the following into the Terminal app:

sudo open -a TextEdit /etc/hosts

When prompted enter your password and you will then see the hosts file with a list of hosts defined.

Move to the bottom of the list and then enter the domain you want to use locally for your WordPress installation. For this example we are going to use the multisite.dev. As this is going to be a Multisite installation you will need to add subdomains in here too. Here is an example:

About

My Cyber Universe was founded in May 2013 by Arthur Gareginyan, a designer and full stack software engineer. Main goal is to be the source for anyone who wants to learn the web design, software and web development.