Clone Site Url is Redirecting to Live Site


My cloned site is redirecting to the Live site.
I asked help from Cloudways and they looked into it saying "Your WP_OPTIONS table is hard corded with your domain and there are few tables that are showing your actual site URL instead of your cloned application"
I need replace the domain url to the clone url. Can someone instruct me on how I can do this?

Is there an mySQL command I can run?

1 Like

Hi @f.salim4

Have you tried replacing the URLs from WordPress Dashboard?

I hope this will help you out. If not, you may need to change values directly from the database.
Find the table WP_OPTIONS in your database. Replace option_value of the siteurl and home with the cloned URL of your site.

You can now visit the dashboard of the cloned site, go to Settings and then select Permalinks and change it as per your desire.

1 Like

As per your first suggestion, I can’t access the wp-admin since it redirects.
For the 2nd suggestion, the new URLs were already set for siteurl and home.

Let me know if you have any more ideas.


I’m also observing this issue; did you find any resolution?

I ran into this issue multiple times. Live support fixed it and told me it came from the app’s cache:

You can delete cache folder inside wp-content of cloned app and restart all services from Server > Manage Services

I have not tried this myself yet, but it might be worth giving it a shot.

This happened to me again and the above did not work. Another thing they told me to do next this happens (don’t forget to replace the URLs with the ones for your actual app and cloned app):

Simply run below mentioned command in public_html on clone site
wp search-replace ‘’ ‘’ --skip-columns=guid

Not sure if this is of any help but I thought I’d offer it.

I have also experienced this both times that I created a clone site and on both occasions the support chat was able to fix it. But they never accurately described to me how they did it, the first time they told me it was a cache file but the second time I looked for the file and it wasn’t in the location they gave me.

However I have now experienced the same thing using the new Staging service and the fix turned out to be to clear the Redis cache. Once that was done the redirection problem stopped.

Perhaps this will also apply to the cloning process, may be worth a try if nothing else works.

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:

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

Thank you for sharing @rick1.

Ibad Rehman

1 Like

When using Redis - wp-config.php has a “salt key” line which needs to be unique. That fixed it in my case.