Print

Staging Site Redirects To Live Site

If a WP Staging staging site redirects you back to the live site or you can not log in to the staging site try out the steps below to resolve it:

  • Disable security or login plugins on staging site
  • Disable admin authorization in WP Staging > Settings
  • Clone staging site to a subdomain instead subfolder
  • Use absolute URL’s instead relative URL’s on your live site and clone again

Try out the first two points first!

In 99% of all cases following these steps will fix the redirection or login issues on your staging site.

Use of Language Plugins like WPML or Polylang:

If you use a language plugin like Polylang or WPML that adds a language slug to the URL, for instance, https:// example.com/en/page1
you will need to activate the post name permalinks on your staging site.

Disable Security & Login Plugins on Staging Website

Create a new staging website and disable certain kind of plugins by excluding the plugin folders 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 (Or activate permalinks on the staging site)
  • Redirection / “Hide my Login” plugins

If you already created a staging website and you retrospective need to disable those security plugins you can disable certain plugins by renaming their plugin folder via FTP or any file manager plugin.

For instance, you can disable the WP Spamshield plugin by renaming the plugin folder stagingsite/wp-content/plugins/wp-spamshield to something else.

Disable WP Staging Custom Login Prompt

WP Staging creates an extra authentication form in front of your website to prevent your site from being accessed by other people or by search engines.

It looks like that:

If you can not log in to your staging site you can disable that login prompt.

Go to WP-Staging > Settings to do so and to disable the login prompt by allowing all users accessing your staging site:

After that, you need to create a new staging site to make this option available to it.

Alternatively, you can disable WP Staging on the existing staging site by renaming its plugin folder wp-content/plugins/wp-staging to something else.

Now the login prompt is gone and you are able to access your staging site as your regular website.

Use absolute URLs, instead of relative ones

Make sure that all the links on your site are based on an absolute link format and are not based on relative ones.

Otherwise, it could happen that clicking on a link on a staging site will redirect you back to the live site.

Correct: https://domain.com/path-to-page
Wrong: /path-to-page

Clone to a Subdomain

If you are not able to solve the redirection issue you can clone 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 log in?

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

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

define('WP_SITEURL',  'www.domain.com');
define('WP_HOME',  'www.domain.com');

Change it to:

define('WP_SITEURL',  'www.domain.com/stagingsite');
define('WP_HOME',  'www.domain.com/stagingsite');

If this does not resolve the issue open a support ticket and we assist you to resolve this login issue.