Ive rsynced the directory structure from mywebsite.com to mywebsite.local ( on my LAN) and copied the DB . the website mywebsite.local displays the website, but i cant log with the admin user/pw from the production site . The DB tables look the same to me. Its a single site and in sites/default/settings.php it points to DB host is 'localhost' Tailing apache access.log and I can see the .local site is served from localhost

Do I need to change anything else ?

  • 1
    If you imported the production db into your local one correctly there is nothing more to be done, the user logins should work. Are you typing the password or copying it? Are you using the same keyboard layout (special characters)? Are you sure it's the same password as on the production site? How are you testing that?
    – prkos
    Apr 9, 2019 at 16:33
  • i can log into the production site OK. the same password in my dev site doesnt let me in.
    – user358360
    Apr 10, 2019 at 19:17
  • Did you sanitize the database?
    – sanzante
    Apr 13, 2019 at 9:06

1 Answer 1


You can try login with https://drushcommands.com/drush-8x/user/user-login/

drush uli admin

Which will give you a login link for user admin

If you invoke it without a username it gives you a login link for user 1

drush uli
  • i can log into the production site OK. the same password in my dev site doesnt let me in. The DB password on the original install has !#@ characters in it . I cant log into mysql command line on my dev server in spite of quotes and escaping the ! and/or the @, but can using the pw with #@! in it , in phymyadmin changing the password to my mysql root pw on the dev server didnt fix it either I suspect its a database login problem . and what the significance of $db_url in settings.php ?
    – user358360
    Apr 10, 2019 at 19:30
  • Please add all the new information discovered through comments to your question! The DB password for the DB user is NOT the same as the Drupal user login, and the DB information will likely NOT be the same between your production and dev environments. Since you got the dev site up it seems your dev DB data is correct, otherwise you wouldn't get the site to load at all. But I have experienced problems when installing Drupal 8 through Composer with the DB password containing & or #, I had to change the password to not contain those to make it work through the Composer.
    – prkos
    Apr 10, 2019 at 19:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.