When moving a WP site, why does wp-admin redirect to old site?

If this is a single WordPress install, there are a couple database entries with your old domain. Specifically, siteurl and home within wp_options.

That said, if the dev URL is temporary, you can also set the following two constants in wp-config.php:

define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']);
define('WP_SITEURL', WP_HOME . "https://wordpress.stackexchange.com/");

Provided that WordPress is installed in the root of your website.

Leave a Comment