Rename URL in WordPress database after transfer

Go to phpMyAdmin and execute the following sql commands:

UPDATE wpcw_options SET option_value = replace(option_value, 'http://www.old.com', 'http://www.new.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wpcw_posts SET guid = replace(guid, 'http://www.old.com', 'http://www.new.com');
UPDATE wpcw_posts SET post_content = replace(post_content, 'http://www.old.com', 'http://www.new.com');
UPDATE wpcw_postmeta SET meta_value = replace(meta_value, 'http://www.old.com', 'http://www.new.com');