Cloned WordPress Redirecting Back To Original

WordPress Admin Redirecting

Was recently working on a WordPress instance for a client where we have a cloned version of the production installation in dev. Since WordPress stores its settings in the database it would redirect to the production instance when I tried to log into the WordPress admin on the dev instance. Thankfully, the fix was fairly simple.

  • SSHed into the dev instance
  • logged into MySQL database
  • updated ‘wp_options’ table rows where ‘option_name’ is ‘siteurl’ and ‘home’ and set it to the dev url instead of the production url