When asked to work on an existing WordPress Site, I generally take a copy of the whole site and work on it locally. For quite a few years I have used a script such as the following after importing the database locally.
UPDATE wp_options SET option_value = replace(option_value, 'http://clientsite.co.uk', 'http://local.wordpressdev') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = REPLACE (guid, 'http://clientsite.co.uk', 'http://local.wordpressdev');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://clientsite.co.uk', 'http://local.wordpressdev');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://clientsite.co.uk', 'http://local.wordpressdev');
I've seen advice to never mess with post guids but the above has always worked for me and has, to my knowledge, never caused any problems.
My question is, is this still a valid migration method with Wordpress 4? Also do plugins like 'Search & Replace' or tools such as WP-CLI
do this better?