Testing sites on a staging server with clients can be a bit of a pain in WordPress. WordPress itself saves information about the domain name in the database, which makes it a pain to test a site on a staging server at http://[insert IP here] without using the actual host name. I generally get around this issue on my local development server by changing my Windows hosts file to look for the client’s domain on localhost.
Unfortunately if you want to have a client test a WordPress site before it goes live you have to do a search and replace on the SQL file to change all occurrences of the client’s domain with the domain/IP for your staging server. In my experience though, that can end up being one big hassle and may not work as easily as you want it to…especially when plugins come into the picture.
Another option is to have the client edit his own Windows hosts file to point the domain at your staging server. That solves the problem of having to edit the database away from, and back to the production host name before launch. But then again, some clients don’t have the computer savvy to get this done easily…even if you walk them through it step by step.
Introducing Windows Hosts File Editor
After spending 30 minutes on the phone with a client to help him edit his Windows hosts file I thought to myself, “There has got to be a better way!” So I went searching and stumbled on a great little freeware app called Windows Hosts File Editor.
Have your client download and install this app and instead of guiding them through painful telephone tutorials on how to find the hosts file and how to show hidden files and folders, they can run the program, paste a line you send them via email into the text editor and voila, hosts file edited.
Sure it’s totally overkill for someone who can edit the hosts file himself, but never underestimate the power of simplifying tasks when working with clients. It’ll help make your job easier and you’ll look more professional.