Hi All, so i have been having this issue aswell but i have it resolved via lice help so here are the details just in case you all need it:
clone application on the server or create an application and migrate the site
Access the site via FTP
Delete all cache files/folders from wp-content/cache
next go to PHPmyAdmin and replace all live urls with the staging urls using this sql query:
UPDATE (YOUR-DB-prefix)_options SET option_value = replace(option_value, ‘(YOUR-live-url)’, ‘(YOUR-staging-url)’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE (YOUR-DB-prefix)_posts SET guid = replace(guid, ‘(YOUR-live-url)’,’(YOUR-staging-url)’);
UPDATE (YOUR-DB-prefix)_posts SET post_content = replace(post_content, ‘(YOUR-live-url)’, ‘(YOUR-staging-url)’);
UPDATE (YOUR-DB-prefix)_postmeta SET meta_value = replace(meta_value,’(YOUR-live-url)’,’(YOUR-staging-url)’);
Next go to Application management > Application Settings > Reset permission and reset
is it still redirecting?
if yes:
access the wp-config and add:
define(‘WP_HOME’,‘YOUR-staging-url’);
define(‘WP_SITEURL’,‘YOUR-staging-url’);
this works for me.
Then when you need to make it a live site:
phpmyadmin - using sql command above, change staging urls to live urls
clear cache
delete the wp-config urls
add a domain in domain management
point domain to IP of the server
job done