Using MAMP and Xip.io to view a WordPress Multisite on a local network

I have not used MAMP and Xip.io for my local installation, but rather I used XAMPP.

I will explain to you the idea that I did to enable multi-site setup on my computer, and hopefully this would direct you in the right way allowing you an implementation using MAMP. Note that I am using Windows.

Before doing anything, I was planning to have my sub-domain setup for my network, not a sub-directory. Therefore my plan was to have domain.dev, www.domain.dev, sub1.domain.dev, sub2.domain.dev …etc.

Therefore, I had to add in my hosts file the following entries:

127.0.0.1       domain.dev
127.0.0.1       www.domain.dev
127.0.0.1       sub1.domain.dev
127.0.0.1       sub2.domain.dev

Then I updated my virtual hosts file httpd-vhosts.conf to include the following:

<VirtualHost domain.dev:80>
    ServerAdmin admin@domaindev
    DocumentRoot "C:/path/to/wordpress"
    ServerName domain.dev
    ServerAlias www.domain.dev

    <Directory "C:/path/to/wordpress">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>

</VirtualHost>



<VirtualHost sub1.domain.dev:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/path/to/wordpress"
    ServerName sub1.domain.dev

    <Directory "C:/path/to/wordpress">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>

</VirtualHost>

<VirtualHost sub2.domain.dev:80>
    ServerAdmin [email protected]
    DocumentRoot "C:/path/to/wordpress"
    ServerName sub2.domain.dev

    <Directory "C:/path/to/wordpress">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>

</VirtualHost>

Then I, I installed WordPress as usual, single installation.

Then I enabled multi-site with sub-domain as described here and everything worked perfectly.

Leave a Comment