Locked out of Local WordPress Admin Dashboard and Site

Issue Summary

While logged into my admin dashboard, I changed the site URL in settings to “javacentral.coffee.local” and was immediately locked out. I’m guessing I need to reset the site URL to “javacentral.coffee” from the site files, but don’t know where to find this.

Error Message from Local: “Warning! The site’s WordPress URL settings do not match the host set in Local.”

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    Just the one. The only site I have on Local.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Received this message when trying to open the new, plain site in a browser:

"The site you requested does not have an associated route in Local.
If you continue to get this message after refreshing, try restarting the Local site.

If the error persists, check the Local Router Logs in Local by going to
Help » Reveal Local Router’s Logs."


Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!

I logged into my admin dashboard through Local as normal. Went to General Settings and updated the WordPress URL to include “.local” on the end. This automatically locked me out and when I tried to log back in through Local, I received this error message: “Warning! The site’s WordPress URL settings do not match the host set in Local.”

System Details

  • Which version of Local is being used?

  • What Operating System (OS) and OS version is being used?

    • For example: macOS Catalina or Windows 10 Professional
      Windows 11 Home
  • Attach the Local Log. See this Help Doc for instructions on how to do so:

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi there @emilyolove - welcome to the Local community! :wave:

You should be able to update the Site URL through the wp-config.php file (which can be accessed by heading into the Local app > Go to site folder > app > public > wp-config.php).

Then you can add these lines of code (replacing with the appropriate domain)

define( 'WP_HOME' , 'http://example.com' );

define( 'WP_SITEURL' , 'http://example.com' );

There is a tradeoff here, though. This will hardcode the site URL and you will no longer be able to update them within the WordPress settings in the Dashboard.

The other option is to update the functions.php file (as described in this article) and then the code can be removed and will not hardcode the site URL.

Can you give this a try and let me know if this helps?


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