WordPress URL settings do not match the host set in Local

I have been trying to install local copies of live sites via the usual zip file method to do further work on them, and each time I am getting the following warning:

This site’s WordPress URL settings do not match the host set in Local

The “Fix It” button doesn’t fix it.

What is happening here? I have had to revert to live development to get any work done.

Thank you.

I’m having the exact same problem and can’t access my Local site currently.

The general issue that this error message is trying to indicate is that for some reason, the url that Local knows about – ie, the one set in “Site Domain” is different than what is saved within the database.

There can be different reasons for this, but a good first step is to take a look at the siteurl option within the database. You can use Adminer, and examine the wp_options table, or I like using wp-cli from within the site shell:

wp get option siteurl --skip-plugins --skip-themes

I like to use the --skip-plugins and --skip-themes flags because in the few cases that I’ve seen of this bug, it has to do with a plugin that is trying to force HTTPS and is mangling the search and replace process that Local does.

thanks for the insight ben.

could it be that because my practice is to host the wp root in a directory one level down from the url, when bringing a site in the two DB entries in wp_options will be domain.com/directory for siteurl and domain.com for home?

i assumed that because the site worked on the server (and therefore the paths are correct) it should carry into local okay. obviously though that’s not the case.

if i’m right that this could be causing the issue what would be a practical (as in "not so convoluted as to negate the convenience of developing locally in the first place) way of getting arouns this?

With absolute good intentions:

wp option get siteurl --skip-plugins --skip-themes
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.