If you are on the staging site and clicking a link redirects you back to the live site try first to switch the permalink settings on the staging site and make it identical to the permalink settings of your production website.
As default WP Staging sets the permalink settings to the default plain type, switching this setting will often resolve any link redirect issues.
If this is not going to fix the redirection check out the structure of a link that redirects back to the production website.
WP Staging cannot do a search & replace over relative links, so it will need absolute links to be able to do an automatic search & replace over it.
So, for instance:
Not working link:
To resolve it you have three options:
- A. Create a new staging site and use a subdomain for it. Then, relative links have no negative side effect and will be working as intended.
- B. Use absolute URLs, instead of relative links.
Convert all relative links to absolute ones. Do this first on the live site and then clone again or just change the links on the staging site.
- C. Ignore non-working relative links and open the pages from the admin dashboard if you want to edit them.
The recommended way is either option A or B as it makes working on the staging site much easier than having the need to open all the pages for editing from the admin dashboard.
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:
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,
you will need to activate the post name permalinks on your staging site.
Otherwise, this could be another reason for a link redirect to live.
Disable Security & Login Plugins on Staging Website
Create a new staging website and disable all these plugins by excluding the plugin folders from the cloning process:
- 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.
Does it still redirect you to the production website?
If this does not resolve the issue open a support ticket and we assist you to resolve this login issue.