Locked out of local site - linked to live

Using local I created a website that has (had) a different URL than live site.
All went well in creation and testing.
I then decided I was ready to upload to live and thought that having different URL would not be good. So within my local settings I changed URL in two places to represent what the live site had in those same fields.
Bad idea apparently, because now my local server is attempting to log into the live site and I seemingly have lost my local version.
I suspect this is self inflicted as I changed URLs - but my quesiton to this group is - how do I change (undo)?

Sorry newbie at this but will be appreciative of any positive suggestions.

Hi @rjhansen63

Have you tried changing the Local URL back to the original yet? Once you Start the site (button in the upper right corner) you can click change next to the site URL and adjust the name back so it ends in .local.

After you do this, you may need to try clearing the cache and cookies on your browser and then closing your active sessions to start with a clean slate. A reboot might not be a bad idea either.

How do I clear my browser’s cache?

You may also try utilizing a different browser (Firefox, Safari, Internet Explorer if you’re using Chrome for example) or an Incognito window to troubleshoot further.

The easiest way to open an Incognito window is with the keyboard shortcut combination Ctrl-Shift-N (Windows) or Command-Shift-N (macOS). Another way is to click on the menu on the upper right — it’s three vertical dots — and select New Incognito Window from the list.

Nick - Thank you for reply. As of this point I have done nothing other than add the following to wp-config.php file. (based on search)

define( ‘WP_HOME’, ‘http://example.com’);
define( ‘WP_SITEURL’, ‘http://example.com’ );

Doing so stopped it from going to live site but then gave me a 404 error. I then removed the above parameters as it did not seem to assist in me solving the issue.

To your suggestion - I have not tried changing the URL. Reading what you posted it seems that if I start the site I would be pointing to live (production) and then if I changed URL - I would be chaning production. Before I try your suggestion, could you confirm that this would not impact production?

Also one additional thought since my previous post - I did take a backup at the start of the day and although it would not include my latest and greatest - it would get me back to being just a few hours old. However I do not see how I could restore as again - I am pointing to live. Perhaps uninstall local - reinstall and create a new local website, then restore???

I just reread my original post and would like to clarify. When I said I changed URL - I actually was within WP dashboard and changed via settings menu - the home, siteurl, and email address - ie; sync’d up with what was in production values. So to be clear, when I changed URL it was not through “local”, it was through word press (site) dashboard.

Thanks again in advance for any helpful suggestions.

Rick

Hi @rjhansen63

An important distinction to make here is that your Local site and your Production site are essentially two separate sites. So changes you make in Local can’t impact your Production site unless you push or migrate your Local site over top of it, and vice versa with Production. That said, having your domain match in both places can cause problems with routing.

In Local I would remove your wp-config changes and then change your domain here so it’s back to the .local domain.

Thanks Nick - When I start local and then select my site, the screen displayed (like your example above) has the domain name I initially created and ends in “.local”. It is when I select “WP Admin” or “open site” that it then is attempting to connect with LIVE (production) site.

When I click on “Open Site”, the new browser window will show parkfarmscomputersysstems.local (in address bar) and then after 15 seconds or so - switch to actual live URL (https://www.parkfarmscomputer.com/) - as you can see (and what started all of my issues is) the actual production site is “parkfarmcomputer” but when I created the local (new website) I entered “parkfarmcomputersystems”.

Since my initial changes (those which started all of this) were made through the wordpress dashboard/settings - I feel like I need to be back there to revert those changes. I suspect those changes were saved in the database - perhaps I can directly edit there?

Sorry if I am misunderstanding you.

Thanks, Rick

OK - so I clicked on the “Database” tab and then “Open AdminerNeo”. That brought up what appears to be a database program. Searched for “home” and “url” and found within “wp_options”.

So can I just “edit” this value back to “parkfarmcomputersystems.local”?
And then also do the same for “home”?

If my thoughts above would work, please confirm exactly what I should enter in
Do I enter “parkfarmcomputersystems.local” or does it need to be more fully qualified and if so, what would it look like?

When I go to my browser and type “http://parkfarmcomputersystems.local/” the LIVE production site comes up currently.

Thanks

You’ll want to update those references in your DB and/or wp-config.php file to replace the .com domain with the .local one. That’s likely what is causing the routing issues for you. After you’ve done that you might need to clear cache and cookies on your browser or try restarting your device as you’ve likely got cache built up in your browser and maybe your network.

Thanks for confirming Nick - what do I change it to?
This → http://parkfarmcomputersystems.local
or this: parkfarmcomputersystems.local
or something different?

parkfarmcomputersystems.local should suffice

After updating that you might also want to resave your Permalinks and then regenerate Elementor/Astra CSS as well:

The Flywheel guide to clearing your theme/plugin cache

Thanks Nick - We appear to be making progress. Here is what I have observed

So I edited the two DB parameters (HOME, URL) within the wp_options to “parkfarmcomputersystems.local”. Saved and closed DB and LOCAL. Restarted machine.

After bootup, I opened browswer and clear cache/cookies

Started LOCAL, site, and selected “Open site”.
After spinning for about 30 seconds or so, this is what appeared.

This is my new (local) site home page - so that is good - however there are a bunch of warnings.

Ideas on the warnings?

Thanks, Rick

When I click on “WP Admin” from LOCAL/site, I get this

Page content (text) seems to exist but images seem to be broken.

I have not done your last suggestion regarding permalinks and theme cache - would performing that help this?

Also, not sure how to do the permalink suggestion - unless that is within the link you provided.

Hey Nick - looking at the last link you provided - it seems they are expecting you to be at your wordpress site dashboard. But was you can see from a previous post, I am not seeing that when I click on “WP Admin”.

Referencing this suggestion from Nick
After updating that you might also want to resave your Permalinks and then regenerate Elementor/Astra CSS as well:

The Flywheel guide to clearing your theme/plugin cache

Clarifiying questions:
“resave Permalinks” - just go into the permalink menu and hit save?
“regenerate elementor/Astra” CSS - please provide additional guidance here, not sure what to do.
“flywheel cache” - I looked at the link and what I am seeing (or not seeing) in the dashboard does not seem to align with doc.

Thanks, Rick

For your Local site I would try disabling plugins. You might have a plugin that’s masking the login or preventing access for security. If you click on Site Shell in your Local app you can run a command like wp plugin deactivate --all to disable them all at once and then see if you can access the login page.

Ran command

Stop and then restarted site - same screen when clicking “WP Admin”

When I click on “dashboard”, this is what I see

There might be an issue or conflict with the theme since it giving all of the warnings, so you could try swapping to a regular WordPress default theme for now to see if that helps.

Sorry for delayed response but this site locked me out for 24 hours - due to too many posts in one day.

I reloaded Astra theme but that did not seem to change anything. This is what I get when starting LOCAL, selecting SITE, and clicking “WP Admin”

@rjhansen63 can you try swapping to a default theme? Twentytwentyfour for example or whatever you might have loaded on the site?

I have no other theme currently loaded that I could activate. Will look and see if I can manually load one

So I downloaded, installed, and activated

no difference - if anything, seems worse