new url is always changing to the old url in the wp database

[ad_1]

Hi,

I would like to create a staging website from the original website. A year ago I had already done this and it went perfectly. This one I also deleted back in the days so I wanted to create a new one.

I migrated all the files to this subsite. (via updraft migration) But the url never wants to change to staging.domainname.be.

I have already tried several options:
– I used the updraft migration tool, with the checkbox checked that it can adjust the url anywhere. (old to new)
– Via the updraft clone tool (it just forward me back to the original website)
– Via this tutorial: https://www.inmotionhosting.com/support/edu/wordpress/wp-cli/wp-cli-search-replace-command/
– manually in the database
– Via a mysql script in the database itself (for privacy I put domainname):
UPDATE wp_options SET option_value = replace(option_value, ‘domainname.be’, ‘staging.domainname.be’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;UPDATE wp_posts SET guid = replace(guid, ‘domainname.be’,’staging.domainname.be’);UPDATE wp_posts SET post_content = replace(post_content, ‘domainname.be’, ‘staging.domainname.be’); UPDATE wp_postmeta SET meta_value = replace(meta_value,’domainname.be’,’staging.domainname.be’);

In the last two options, I saw that it adjusts the url in the databse. But as soon as I surf to my staging url it automatically adjusts back to the old url in the database.

I contacted my hosting and they said this is probably due to wordpress.

The page I need help with: [log in to see the link]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer