Wordpress - My wordpress site gets redirected automatically to the old site any known solution for this?

This is because the URL settings inside WordPress are still pointing to the old WordPress site. More information is available in the Moving WordPress documentation.

If your WordPress admin pages are still working, you can go to Settings → General, and change the WordPress URL and the Site Address to the correct values.

If your WordPress site is completely broken, then you can add the following values to wp-config.php, which will have the same effect:

define('WP_HOME', 'http://your_server/blog');
define('WP_SITEURL', 'http://your_server/blog');

Note that in most cases, WP_HOME and WP_SITEURL will be the same, apart from exceptional circumstances.


Give DNS 12-24 hours to propogate and flush the DNS cache on your PC.

Check wp-config.php for hardcoded URLs and change them, if needed.

Search your database with phpmyadmin for all occurrences of the old URL using interconnectit.com WordPress Serialized PHP Search Replace Tool.

Reset Dashboard>>Settings>>Permalinks and be sure .htaccess is writable.

Check your theme files for hardcoded URLs.