Staging Site Redirects To Live Site

If the staging site redirects to the live site when access it or you can not log in to the staging site try out the steps below:

Use absolute URLs, instead of relative ones

Wrong: /path-to-page

Disable certain plugins on staging website

Create a new staging website and disable these plugins by excluding plugins from cloning:

  • Security plugins like wordfence, iThemes security, Cerber, WP Spamshield, etc.
  • Caching plugins like W3 Total, WP Rocket, etc.
  • Language plugins like WPML, polylang
  • Redirection / Login plugins

Clone to a Subdomain

If you are not able to solve the redirection issue you can your WordPress website to a subdomain and to another folder by using the custom target path and hostname option of wp staging pro:

Still cannot login?

If this also does not resolve the issue check out the wp-config.php of the staging site by using FTP.

If it contains URL of the live site change it to the URL of your staging site. E.g.

define('WP_SITEURL',  '');
define('WP_HOME',  '');

Change it to:

define('WP_SITEURL',  '');
define('WP_HOME',  '');

If this does not resolve the issue open a support ticket.