WP development to replace live site

I have a client with a currunt site hosted on one server, and I am developing a new site for them on another server. I am developing with WordPress. I want the client to see the new site, and be able to edit content, before it goes live. Problem is, Any sort of temporary solution used such as using the new hosts IP address and username as a way to view the site, and changing PHPMyAdmin records for wp-options for siteurl and home to that url – work mostly, but do not address how images added via the WP Admin are added using an absolute url, and as such, they do not show up. And in addition, any new images added would be added at the temporary url location so would not work when going live.

Anyone develop sites as new sites for clients with existing sites, on a new server, and have this issue. (I often host my client’s new sites so this comes into play often.)

(3) Test environments are best made by cloning your Production WordPress. Always using $_SERVER[‘SERVER_NAME’] in wp-config.php as part of the definition of WordPress Address and Blog Address (rather than specifying them in the Admin panel, which stores them in the database), is one step to make cloning easier and less error-prone. Reference – http://codex.wordpress.org/Editing_wp-config.php
The second step is to Save Permalinks as part of the Clone process so that .htaccess is rewritten and many URLs used on the web site are corrected to the location of the Clone. And the third step is to use the Search and Replace or similar plugin to change any hardcoded URLs in the WordPress database.

If you find any areas missing from the lengthy set of posts, let me know.