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

I had recently moved my wp site from a domain to other, but when I type in the new domain’s address it gets redirected to the old domain/some_page.

Is this any common problem? Is there any known solution to this?

I had checked my code and it has no redirects to this page. Can someone give me a hand on this?

7 s
7

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.

Leave a Comment