Jump to content

Cannot login to local copy of live website


floko
 Share

Recommended Posts

Hi everyone,

I copied all root files, /site and /wire content from our live website to a local XAMPP installation, also a copy of the live database dump.
Now frontend works fine on localhost, but I cannot login to my admin account.
Initially, I received the warning "request was aborted because it appears to be forged" until I suppressed CSRF protection in /wire/config.php
Also I set sessionFingerprint = 0 and sessionChallenge to false in config, additionally I deleted corresponding cookies.
While the warning disappeared, I am still not able to log in.
(Neither do file privileges/permission settings seem to be an issue, as far as I can tell.)

Any idea where to investigate next?
Thank you!
 

 

Link to comment
Share on other sites

Do you have the same userAuthSalt in config.php? If you change that (or it does not exist) you'll not be able to use the same password. 

You can also reset/force-login like this: https://processwire.com/talk/topic/29593-solved-do-the-reset-password-tricks-work-for-you-they-dont-work-for-me/?do=findComment&comment=239355

But it would be better if you understand why it does not work and then fix it if needed 🙂 

  • Like 1
Link to comment
Share on other sites

I think the concept of /site/ready.php has been there well before I started using PW in 2013 - so I think you can just create it and it should work. Your issue sounds strange though and I'm not sure what would be best to do. But I'd try to see if it works with force-login and then resetting the superuser password. At least that will show you where the problem lies (either a wrong passwort or something else).

Link to comment
Share on other sites

Had similar issues with login on local site a while ago using DDEV. I put a config-dev.php into my local site folder and set the $config->httpHosts to my local site domain.ddev.site. In addition I changed the Session suffix for my localsite so I could open live and local site in the browser the same time. Otherwise the sessions will overwrite each other causing weired issues. With this two changes everything works great even live/local site by site in different browser tabs.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...