Not creating local sites

Hello, this is a strange issue. When I’m creating a local site on DevKinsta by pulling one of my sites from Kinsta and then clicking the link to go to the .local site it just redirects me to the live site- any changes made reflect on the live site as well. What’s causing this? How can I fix it? Same goes when I just type it into the browser.

Thanks.

Hey @bw21s :wave:
This usually occurs when the wp-config.php has the URL hard coded. Take a look at that file and see if perhaps it’s in there. If not, it could be coming from somewhere else either a plugin or coded somewhere. Try renaming the plugins directory to deactivate all plugins to see if that helps too.

Hi, yeah… I don’t see any URLs in the wp-config.php file, and renaming the plugin directory (wp-content > plugins) to plugins_renamed doesn’t do anything either…

After disabling all the plugins, have you tried opening it in incognito/private mode on your browser? The redirect could be cached on the browser. If that doesn’t help, perhaps its been coded into the theme?

Mmm… I have no clue anymore :joy:.

I set up the staging environment on Kinsta, then disabled all the plugins and changed the theme to 2021. Then imported it into DevKinsta and same issue… even in Incognito. Also deleted the staging environment and then it still tries to take me there.

I can create a fresh site and run it on local no problem. Also, I had sites (the same sites actually) running fine on DevKinsta before with the same theme- GeneratePress Premium is what I’ve got installed, but I’m switching to a less generic theme that requires code editing, which is why I want to use DevKinsta, so I can access files in my code editor as well as remove certain files from the theme that I don’t need/ want.

I’m a pretty amateur coder, so potentially I overlooked the URL in the wp-config.php file? I can’t see any actual URLs in there apart from 1 or 2 Wordpress references, but maybe that is not what we’re looking for? (as in not an actual URL in the folder?)

:thinking: Hm, could you try opening the Database Manager.

Once you’re there, select wp_options > select data.

I’m curious what’s shown for you for siteurl and home here:

You could also try the Search field here and typing in the redirected URL to find if it’s anywhere on the database.

If it is located anywhere on the database, those values need to be replaced with the local URL.