Title: Problem with Migration Mode and admin user
Last modified: September 24, 2019

---

# Problem with Migration Mode and admin user

 *  [Pablo](https://wordpress.org/support/users/pmartinezc/)
 * (@pmartinezc)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/)
 * Hi! Thank you for creating this magnificent plugin, appreciate it.
 * I’ve got an issue with the logins and I hope you could shed some light on it:
 * **If I turn Migrate Mode On** –> I can log in with my local Admin user and external
   users from a SQL Server database can log in too. But **if an external user changes
   his password it´s not updated in the local WordPress database**, resulting in
   login errors (because it’s checking the local user first and the stored password
   is the old one).
 * **If I turn Migrate Mode off** –> External users can log in and if they happen
   to change their password it´s successfully updated in the local WordPress database(
   I guess it might update any other field such as name or email). **But the problem
   here is: my local Admin user can´t log in, so I lose entirely the website´s control**.
   It seems like only the external database was checked and the local database was
   ignored.
 * Is there anything I can do to fix this? I’m I obliged to have both regular users
   and admin user in the same external database? I guess with the role field per
   user and stuff.
 * I’d like to log in with my local Admin user, log in with an external user and
   keep the fields updated in the local WordPress database, in case they are changed
   in the external one, is this possible to achieve?
 * My local WordPress database is MySQL based and the external one is SQL Server
   based.
 * Any help would be appreciated
 * Thanks in advance
    -  This topic was modified 6 years, 7 months ago by [Pablo](https://wordpress.org/support/users/pmartinezc/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-11973919)
 * Hey [@pmartinezc](https://wordpress.org/support/users/pmartinezc/),
 * Sorry for being so slow to reply. I’m putting a new kitchen in at home which 
   is consuming a lot of time at the moment 😛
 * > If I turn Migrate Mode On –> I can log in with my local Admin user and external
   > users from a SQL Server database can log in too. But if an external user changes
   > his password it´s not updated in the local WordPress database, resulting in
   > login errors (because it’s checking the local user first and the stored password
   > is the old one).
 * This sounds right. This is the designed behaviour as the idea of the migration
   was that users are no longer using the old database and are only being migrated
   over to the new site that you’re using. It essentially makes the new WordPress
   database the center of truth but if the user does not currently exist it will
   try and retrieve the data from the database you’re trying to migrate from. Hope
   that makes sense 😛
 * > If I turn Migrate Mode off –> External users can log in and if they happen 
   > to change their password it´s successfully updated in the local WordPress database(
   > I guess it might update any other field such as name or email). But the problem
   > here is: my local Admin user can´t log in, so I lose entirely the website´s
   > control. It seems like only the external database was checked and the local
   > database was ignored.
 * This does not sound like the expected behaviour. Unless you have ticked the ‘
   Disable Local Login’ box.
    “Tick this box if you want to disable the login attempt
   with the WordPress Database if the external login fails. This will only take 
   effect if External Login is enabled.”
 * Can you check this and if this is not the issue I’ll see if I can replicate the
   problem locally.
 * Thanks [@pmartinezc](https://wordpress.org/support/users/pmartinezc/), and apologies
   again for the delay in getting back to you!
 * Tom
 *  Thread Starter [Pablo](https://wordpress.org/support/users/pmartinezc/)
 * (@pmartinezc)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-11981631)
 * Hi! Thanks for your reply
 * I’ve got this configuration (WordPress 5.2.3 + MySQL):
 * ———————————————————-
    **Functionality Settings**
 * -Enable External Login: On
    -Migration Mode: not checked -Redirect after Authentication:
   local + URL -Disable Local Login: not checked
 * **Database Configuration**
 * My external BD settings with SQL Server, test Connection button working and authenticating
   well.
 * **Password Hashing**
 * md5, no salting
 * **Database Table Mapping**
 * I’ve got filled the field mapping, works okay
    Role Field name and Multiple Roles
   per user: not checked
 * **Role Settings**
 * Unspecified Role: Author (because that´s what I want by default for external 
   users).
 * **Exclude Users**
 * Not checked
 * ———————————————————
 * No matter if I check or uncheck ‘Disable Local Login’ with ‘Enable External Users’
   turned On, my local admin user won’t authenticate until Migration Mode is On.
 * By the way, the website is under a WordPress network with more blogs (multisite),¿
   that might be the problem? ‘Enable External Login’ is not checked for the network
   ´s default blog (that way I can log in to the network with no issues, otherwise
   is the same story, if migration mode not checked –> local login fails).
 * I hope these details help finding the solution
    Thank you!
 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-11996825)
 * Hey [@pmartinezc](https://wordpress.org/support/users/pmartinezc/),
 * Apologies for the delay again. Life’s busy at the moment 😛
 * It sounds like you’ve got all the right boxes ticked. However I have not made
   the plugin compatible with multi-site (nor have I ever used a multi-site WordPress
   setup before 😬).
 * I’m adding this feature to the top of my list of to dos and I will leave this
   conversation open so that I can update you when progress is made. Unfortunately
   this is not something I’m going to have time to look at for 6 weeks or so.
 * In the meantime, you’re welcome to look into the plugin and see if you can build
   compatibility yourself. There is a [git repo](https://github.com/tbenyon/wordpress_external_login_plugin)
   for the plugin and I welcome pull requests. 😊
 * Sorry I can’t help you sooner but I just don’t have the capacity to do it at 
   the moment.
 * Tom
 *  Thread Starter [Pablo](https://wordpress.org/support/users/pmartinezc/)
 * (@pmartinezc)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-12004522)
 * Hi! Thank you for your answer.
 * I wish I could fix it myself but I lack the skills.
 * By the way, I tried the ‘external login’ plugin with a regular WordPress Blog,
   no multisite, version 5.2.3. Same issue here, if Migration Mode is not checked
   my local Admin user won’t authenticate, it says user/pass invalid.
 * So I guess this narrows it down to a single-site type of problem. Right?
    It 
   has maybe something to do with the WordPress Version?
 * If you need in-depth details about my configuration don’t hesitate to contact
   me.
 * Thanks again for your help 🙂
 *  Plugin Author [tbenyon](https://wordpress.org/support/users/tbenyon/)
 * (@tbenyon)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-12069826)
 * Hey [@pmartinezc](https://wordpress.org/support/users/pmartinezc/),
 * Really sorry for the delayed reply.
 * I’ve just attempted to replicate this bug for you.
    I used the following passwords
   for testing: Starting password: – Plain text (password1) – Hash ($P$BJkC.Isz7DOxteQmKpKYfr26Qds.
   sT/)
 * Modified password:
    – Plain text (passwordnew) – Hash ($1$zo2d0s91$HQ5fN81Sbb36RoY97e2zx.)
 * Steps I went through:
    1.  deactivate migration mode and set both my external db password and WordPress
        password for my user to password1’s hash
    2.  change password on wordpress database to passwordnew hash
    3.  try to login with new password
    4.  login fails
    5.  login with password1
    6.  login success
    7.  observe wordpress password has changed back to password1 hash
    8.  activate migration mode
    9.  change wordpress password to passwordnew hash in database
    10. try logging in with old password
    11. login failed
    12. try logging in with new password
    13. login succeeds
 * If you go through this process which step does it fail on?
 *  Thread Starter [Pablo](https://wordpress.org/support/users/pmartinezc/)
 * (@pmartinezc)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-12072077)
 * Hi! No worries, thank you very much for your answer.
 * It fails on the very beginning, first I pasted your password1 hash for my local
   user in the local MySQL DB.
 * -Enable external Login OFF and Migration Mode OFF –> local login works (pass:
   password1 with your hash)
 * -Enable external Login ON and Migration Mode OFF –> local login fails
 * Now I try to log in after changing the password to the new one, pasting passwordnew
   hash for my local user in the local MySQL DB:
 * -Enable external Login ON and Migration Mode OFF + typing passwordnew –> local
   login fails
    -Enable external Login ON and Migration Mode OFF + typing password1(
   the previous one) –> local login fails -Enable external Login ON and Migration
   Mode ON + whatever password I paste on the DB –> local login works
 * So, basically, with External Login ON I always need Migration Mode ON in order
   to Log in with my local user, but I lose the sync from the external DB to the
   local DB if anyone happens to change a field, and that’s quite problematic, specially
   if users change their passwords/emails and lose access to the site.
 * I hope this can be fixed, this might happen to other WordPress users too.
 * Thanks again for your help!!
 *  Thread Starter [Pablo](https://wordpress.org/support/users/pmartinezc/)
 * (@pmartinezc)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-12072156)
 * By the way, for this test I didn’t use the external user at all, because admin
   local user has letters for username and the external one consist off an ID with
   numbers, totally different. They are different users. Local should be admin (
   via WP local DB), external SQL Server user should be author by default (via your
   plugin).
 * I mean, I didn’t quite understand why change both local and external user’s pass
   when tests are using only the local user, which has an unique username (the external
   one is not used on your steps). On step 1 I don’t know which user you were referring
   to, so I assumed my local admin user, the one I’m having problems with.
 * Sorry If I misunderstood something, just wanted to clarify that and it might 
   help with the debugging.
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Problem with Migration Mode and admin user’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/external-login_fbebd6.svg)
 * [External Login](https://wordpress.org/plugins/external-login/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/external-login/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/external-login/)
 * [Active Topics](https://wordpress.org/support/plugin/external-login/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/external-login/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/external-login/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [external](https://wordpress.org/support/topic-tag/external/)
 * [local](https://wordpress.org/support/topic-tag/local/)
 * [login](https://wordpress.org/support/topic-tag/login/)

 * 7 replies
 * 2 participants
 * Last reply from: [Pablo](https://wordpress.org/support/users/pmartinezc/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/problem-with-migration-mode-and-admin-user/#post-12072156)
 * Status: not resolved