If you are on the staging site and clicking a link redirects you back to the live site check out first the structure of that particular link that goes back to the production website.
WP Staging cannot do a search & replace over relative links and will need absolute links to be able to do an automatic search & replace over it.
So, for instance:
To fix it you have three options:
- A. Create a new staging site and use a subdomain for it. Relative links have no negative side effect then and will be working as intended.
- B. Use absolute URLs, instead of relative links. Convert all relative links to absolute ones. Do this on the live site and then clone again or do it on the staging site.
- C. Ignore the relative links and open these pages from the admin dashboard if you want to edit them.
The recommended way is option A or B as it makes testing much easier than having the need to open all those pages 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.