How to access MAMP WordPress Site From Internet?

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Mork, Jun 25, 2017.

  1. Mork macrumors 6502

    Jan 9, 2009
    I set up a wordpress site using MAMP on the Mac Server. All works fine - for local only access.

    Yet, when I try to access the site using the actual domain name that resolves to the mac server, the URL jumps back to "localhost" and the site is thus not reachable.

    I tried changing the MySQL config, but that's not the answer.

    I saw a couple postings about adding a couple lines to wp-config.php, but those answers were for people trying to access the site within the same network, at least based on what I found.

    Do I need to set up Apache Virtual Hosts or what exactly?

    So, how do I modify my MAMP/wordpress site so I can access it from the Internet using the default port 8888?

    I added that port to the Mac Server's port forwarding rules and router already.

    Thanks very much in advance. :)
  2. DJLC macrumors 6502a


    Jul 17, 2005
    Mooresville, NC
    What's your WordPress URL as displayed in Settings -> General? That may be your culprit; DNS is resolving properly, but then WordPress rewrites the URL based on that field. I'd try updating that to yourdomain.tld:8888.
  3. Mork, Jun 26, 2017
    Last edited: Jun 26, 2017

    Mork thread starter macrumors 6502

    Jan 9, 2009
    Well, that does partially work (graphics don't get displayed), but it has a huge side-effect.

    Specifically, once I change the site URL in Settings->General, then the mac server's Wiki stops working immediately. Just a blank page displays. Now, at that point, it doesn't matter if I change the settings back to the way they were in WordPress. Something gets changed I can't change back.

    Worse yet, if I change both site settings in Settings -> General in Wordpress (where they were both localhost), then the Mac Server's built-in website throws 500 errors from that point forward.

    I tried removing WordPress and also deleting the corresponding database, and rebooting. But the mac server websites are now totally dead. 500 Errors. No idea what Wordpress/MAMP are doing behind the scenes, but it seems clear I can't use MAMP on my server like I thought I could.

    Removing MAMP Pro doesn't help, either. In fact, even trying to uninstall it gives me an error.

    Restoring the server (again) from a backup and then removing MAMP Pro ....

  4. DJLC macrumors 6502a


    Jul 17, 2005
    Mooresville, NC
    Indeed — as mentioned in the other thread, having two web servers running on there isn't going to work. Either remove OS X Server or remove MAMP.
  5. Mork thread starter macrumors 6502

    Jan 9, 2009
    The Apache servers are running on different ports (80 vs 8888) so I'm not sure why there is a problem.

    My other app servers are also running with no problems on other ports.

  6. belvdr macrumors 603

    Aug 15, 2005
    No longer logging into MR
    You have a conflict somewhere in the configurations then, such as DocumentRoot or VirtualHosts. If they are on separate ports and do not point at the same directories (i.e. share nothing in common), then it would work fine.

    I still don't understand the benefit of installing another web server software just for PHP. I would think the included Apache software could be used.
  7. Mork thread starter macrumors 6502

    Jan 9, 2009
    Since I do my production hosting using a web service company, I'm just not sure how to configure a Drupal Website without MAMP, locally, anyway.

    If you have the steps to do that Drupal site hosting on a Mac Server, I'd love to see them.

  8. Ridge Racer macrumors newbie

    Ridge Racer

    Feb 28, 2011
    Have a look at Docker. It allows multiple self-contained servers for running pretty much any OS and server components/software. Much more flexible than MAMP, and you can download pre-built containers with everything included to run WordPress or Drupal sites in a matter of minutes.

    Have a look at for ready-made Docker containers for Drupal.

    Takes a little learning, but is definitely worth it.
  9. Mork thread starter macrumors 6502

    Jan 9, 2009
    Yes! I think this is the answer. I already use Docker for Java web services so this is a natural fit. I really do not like MAMP.

    Thanks very much for this great idea!!!

Share This Page