2

I have just used All-in-one WP Migration plugin to transfer my website onto another server with new domain. The problem is after the migration no accounts seem to work when logging in on /wp-admin or /wp-login. Neither the default account the fresh WP installation had, nor the accounts that were migrated with the site.

The problem is i cannot access database tonight, is there any way to make that work? Maybe plugin sets new admin account, anybody knows?

3
  • I have used the All-in-one plugin to migrate sites and have not run into this issue. It does not set a new admin. It copies over all of your users from the old site. If you added a new user to the new site before the migration that user will have been deleted when you migrated. Importing the migration file replaces the entire database. Are you relying on autofill passwords?
    – Mr Glass
    Jun 14, 2018 at 20:28
  • @MrGlass Damn, seems like some part might have been corrupted then, maybe its encoding issue, but i suppose WP has utf-8 set as default db encoding right? So it should match each other Jun 14, 2018 at 20:31
  • I think WP has a encoding setting in config.php file. You should also check the DB encoding that was used to create the DB.
    – Mr Glass
    Jun 14, 2018 at 20:35

1 Answer 1

4

If you know the databasename and password of the wordpress install you can insert a new user with mysql.

INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');

INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10');

http://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/

1
  • I tried all the answers on every thread and this is the only one that fixed it for me. It happens everytime if export/import with the migration plugin mentioned by the OP.
    – Eli Nathan
    Oct 24, 2020 at 12:37

Your Answer

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

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