After changing the wordpress to the new website, it is observed that the URL of media files and Internal post links still shows the OLD url.
To change it, login to MySQL server and select the wordpress database and run the below query.
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.oldurl.com/', 'http://www.newurl.com/');
Make sure that the you are on the correct wordpress database
For security reasons if you have changed the database prefix to something else other than the default “wp_” make sure to replace the same in the above query.