Local install of WPMU using MAMP (Mac)


I’ve searched in the forums and found related topics but not one that answers this directly.

I know it is outside of wpmudev’s remit strictly speaking but am sure some of you must have done it and would appreciate the help.

I have done pretty much a default install of MAMP and successfully downloaded and installed a local version of WP. Woo hoo.

But when I try to Create a network, I get the error:

Error: You cannot install a network of sites with your server address.

You cannot use port numbers such as :8888.

(My DB_HOST is localhost:8888).

I can tell from other posts that people have ermmm, mapped their localhost to something else, and if anyone could tell me how I’d be much obliged. You may have guessed I don’t know what I’m talking about…


  • Aaron
    • CTO

    You need to run it on a normal port 80, and setup your initial WP install as a real domain, like localhost.localdomain, or something in your hosts file. Example my test site is setup at test.tld, which i’ve put in my hosts file to point to

    I hope that helps!

  • terraling
    • WPMU DEV Initiate


    thanks for getting back to me, although that kind of went over my head a bit. I don’t have a good handle on localhost and ports (although I’ve tried reading around the subject).

    Here’s what I did, if you could tell me more specifically what to do differently, that would be a big help.

    I downloaded and installed MAMP and ran it.

    The main page tells me I have these connection parameters:

    Host localhost

    Port 8889

    User root

    Password root

    Under phpmyadmin I created a new database (“wordpress”:wink:. (I’m just going with defaults here, so I’m creating it under mysql localhost).

    I downloaded and extracted wordpress to a new folder (“dev_barriole”:wink: in the htdocs folder under MAMP.

    I edited wp-config.php to have these details:

    define(‘DB_NAME’, ‘wordpress’:wink:;

    define(‘DB_USER’, ‘root’:wink:;

    define(‘DB_PASSWORD’, ‘root’:wink:;

    define(‘DB_HOST’, ‘localhost:8888’:wink:;

    define(‘DB_CHARSET’, ‘utf8’:wink:;

    define(‘DB_COLLATE’, ”:wink:;

    and then installed wordpress (via the URL http://localhost:8888/dev_barriole/wp-admin/install.php).

    As a single install it worked fine, but I can’t create a network.

    So… if I delete everything and start over from scratch…

    What do I differently?

    First, edit my hosts file (I know how to do that) so that, for example, test.tld maps to ? Or should it be mapping to a particular port? There’s a lot of stuff in hosts that maps to already.

    Then do I need to tell MAMP anything different before I create the database?

    Also, another question. While trying to read more about doing this, I came across a comment that said that on your local server you cannot setup *.example.com etc., which from the wordpress create network instructions implies that locally you can only have a sub-directory type network and not a sub-domain network, is that true?

    Thanks again for any help.

  • Barry
    • DEV MAN’s Mascot

    In there (MAMP) will be a setting to allow you to change the port for apache. It is currenly set to 8888′ you need to change this to 80. This will mean that you have to enter your password every time your start the servers, but will ensure that wp can be run correctly.

  • terraling
    • WPMU DEV Initiate

    Okay, I’m making progress but still not getting it to work, if I can trouble you again…

    I’ve mapped dev_barriole.com to in my hosts file and I’ve changed the port for the apache server to 80 in MAMP (not touched the mysql port which is 8889 by default). I create a database called ‘wordpress’.

    I have added a folder “testbed” to the htdocs folder in MAMP. For testing I put any old index.html file into that folder and, sure enough, if I go to

    dev_barriole.com/testbed/index.html in my browser it fires up fine.

    So I now download the latest wordpress install, copying all of the contents into the testbed folder.

    I edit the wp_config.php file in the testbed folder as follows:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'wordpress');
    define('DB_USER', 'root');
    define('DB_PASSWORD', 'root');
    define('DB_HOST', 'dev_barriole.com');
    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    My problem is then if I try to access http://dev_barriole.com/testbed/wp-admin/install.php I get a blank screen.

    If I go to http://dev_barriole.com/testbed/readme.html I see the that file okay, but clicking on the link to take me to my install.php file, unsurprisingly, takes me back to the blank screen.

    I also get a blank screen if I, for example, just go to dev_barriole.com/testbed/ which presumably tries to load index.php.

    I’m almost there. Can you see how I’ve slipped up?

    Thanks again for all of your help.

  • terraling
    • WPMU DEV Initiate

    Now we’re straying into “that’s beyond me” territory — I wouldn’t know how to find the logs or what to expect if I did.

    I had hoped that from that list of steps I’d taken something might leap out to those with more experience of it, but if not, nevermind, I’ve managed without a working on a local server this far, I’ll just have to carry on without it…

    Thanks anyway.

  • Philip John
    • DEV MAN’s Apprentice

    Annoyingly, I’m not familiar with running a web server on a Mac otherwise I’d know exactly where you can find those logs. I have a feeling Mason will though, so I’ll ask him to chip in here….

    I’m not willing to give up that easily :wink:


  • Mason
    • DEV MAN’s Sidekick

    Hiya terraling,

    To get the error logs on your mac open Applications>Utilities>Console.app

    In the left hand sidebar at the very bottom you should have php_error.log.

    That’s what you’re looking for. Alternatively, you can view all your logs and open them by going to Applications>Mamp>Logs

    You should find logs for Apache, MySQL, and PHP in this folder.

    Hope this helps!


  • terraling
    • WPMU DEV Initiate


    I’ve located my logs, or rather, where they should be but trying to run the install is not actually throwing any errors, so not creating the php log.

    I have started over, deleted all the old installs etc.,

    confirmed that my hosts file has dev_barriole.com mapped to

    re-installed MAMP and switched the apache port to 80

    created a database named wordpress

    downloaded a new version of wordpress and copied the contents into the htdocs folder of MAMP (this is the one change I made versus the last time, I put it all in the ‘root’ rather than make a folder (which I had called ‘testbed’ in the details above).

    edited the wp-config.php file as above.

    I’m ready to go.

    Just to double-check the re-direct is working, I go to the install via the readme file at dev_barriole.com/readme.html, which looks fine, click on the link to go to dev_barriole.com/wp-admin/install.php and the browser screen goes blank.

    Check for the presence of a log file in applications/mamp/logs — there are mysql and apache logs which report starting up the server etc but not any errors, but there is no php log, ie, no errors.

    If I just go to dev_barriole.com that will try and load index.php, correct? Same thing, blank screen, no error log produced…

    The mystery deepens…

  • drpaul
    • WPMU DEV Initiate

    I have successfully installed MAMP-Pro and then installed multiple domains and several wp and wpmu (subdomain) sites on my Mac…

    I can tell you that I had the same, exact, issue, until I switched to Mamp-Pro… it’s the way MAMP recognizes incoming connections, there are no wildcards in your Mac’s internal configs, and MAMP-Pro solves that problem.

  • terraling
    • WPMU DEV Initiate

    Hi drpaul

    thanks so much for chiming in. I wish I could report that that had solved it, but, alas, it didn’t.

    *but*, I have tracked down the problem and solved it anyway, so thanks for the impetus to go through it all again.

    I’ve been thrown by some of the advice — bearing in mind I started out not knowing much of anything about ports etc. — which meant me changing the wp-config.php from

    define(‘DB_HOST’, ‘localhost:8889’:wink:;


    define(‘DB_HOST’, ‘dev_barriole.com’:wink:;

    confusing the ports for the location of my apache server and that for the mysql database.

    I’ve switched back and managed to do the install. If I seem to have lucked in to a solution — if I’m doing something that I shouldn’t be then please shout. Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.