Clone Site Url is Redirecting to Live Site


#1

Hello,

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?


#2

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.


#3

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.

Thanks


#4

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


#5

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.


#6

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 ‘yourapp.com’ ‘yourclonedapp.cloudwaysapps.com’ --skip-columns=guid


#7

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.