http://localhost on a live Wordpress site

Soldato
Joined
18 Oct 2002
Posts
14,915
This is either genius or the height of folly and I need some help understanding which.

I work for a design agency and we often outsource web development. I'm fairly familiar with Wordpress and I can hack a theme about if I need to but I'm certainly no php expert or anything like that.

One of the biggest pains with Wordpress is working on both a staging and a production server because every time you update or replace the database between the two you have to then change all of the site URLs.

We recently had a site built for us and the developer got around this by setting the site url in the database to http://localhost and then controlling the actual site URL by adding a couple of lines to the wp-config file.

This seems to me to be quite an elegant solution but I just wonder if there are any security issues with this method?

Can anyone shed some light on why this would or wouldn't be a good idea?

Cheers.
 
Thanks for the replies guys.

So while it could be easier to just use an import/export plugin or URL replacement plugin, there's nothing fundamentally wrong with using the localhost method?
 
Back
Top Bottom