How do I tell set up a local WordPress install with public URL?
April 8, 2014 9:37 AM   Subscribe

Can I use /Sites/ in OSX to develop WordPress, and possibly share staging URLs with the outside world?

In the past - I have used XAMPP to develop on a single WordPress install in the XAMPP/htdocs/ folder. This was mainly to test HTML/CSS stuff preliminarily before eventually developing on a public staging server.

Going forward - I would like to start a new WP install for every new client project, each with its own database and temporary URL which can be public to the client, before pushing to a live server via WP Migrate Pro.

Is this possible? Thanks!
posted by critzer to Technology (5 answers total) 3 users marked this as a favorite
Sure, it's possible. I do all my development in a local MAMP environment and (when necessary) point a beta subdomain at my static IP so the client can view/test before going live. You need to configure vhosts and add the A records to the DNS record, but beyond that should be just what you're used to doing with XAMP.

If you don't have a static IP, you could explore dynamic DNS solutions, but, speaking from experience, that ends up being quite a pain. The best approach there would be to subscribe to a service that let's you wildcard the subdomain so you could set-up vhosts like
posted by maniactown at 10:15 AM on April 8, 2014

Yes, this is possible, although you'll need to know your public IP, understand that it might change often, and probably also use a non-standard port for the web server, as port 80 outgoing is often blocked by the internet service providers.

To me, it sounds like more trouble than it's worth, and I'd just put it on the live server, but password protect it, or limit it via visitor IP.
posted by destructive cactus at 10:15 AM on April 8, 2014

Thanks guys.
In terms of viewing the URL in /Sites/ locally, what is the shorter version of that? Right now it looks like


Is that something I need to set in the hosts file?
posted by critzer at 10:25 AM on April 8, 2014

First you have to set-up vhosts to point a ServerName at a Document Root.

If you set a public DNS record that points to your static IP address or use a dynamic DNS service to point * at your IP, you won't need to monkey with your hosts file. The problem with using the hosts file is that those settings are local only, so it won't be public to the client as you require.
posted by maniactown at 10:45 AM on April 8, 2014 [1 favorite]

You probably have a firewall/router between you and the internet. You will need to have a way for people to get past that to talk to your Mac. It isn't hard to do, but no one seems to be catching the issue, so it doesn't exactly surprise me that no one is questioning the wisdom of exposing your machine to the internet at large.

My advice is don't do it. If you aren't already thinking about how to mitigate the risk, you are probably better off not risking your personal machine.

I'd probably just pop for the $10-20 month to have a virtual server in the cloud I could push to. Even if you aren't a great sysadmin, the risk is that you need to recreate the box, which shouldn't be a big deal because you keep everything on your Mac. Better than having to rebuild your main machine from scratch.
posted by Good Brain at 7:10 PM on April 8, 2014

« Older Prolotherapy for arthritic knees?   |   Budget hotels in San Francisco Newer »
This thread is closed to new comments.