After moving Wordpress, login works, but no admin access anymore

后端 未结 7 1255
一个人的身影
一个人的身影 2021-02-04 08:41

After transferring a wordpress from an old ISP to a new ISP, I have trouble with the admin access / access to the dashboard.

The transfer was done by copying all files

7条回答
  •  梦毁少年i
    2021-02-04 09:11

    It sounds like your problem is with the manually created admin account. The error message you're seeing suggests to me that there's an issue with the permissions assigned to the user.

    Can you tell me more about the steps you took to manually add the account?

    I'm guessing you added the user directly to the users table but after doing so, did you add capabilities and user level information to the usermeta table?

    To give you an example, if I'm creating a user I'd run a query to insert the user into the wp_users table (assuming of course we're on the standard table prefix).

    I'd then get the ID of my newly created user and use it to insert two new rows into wp_usermeta.

    umeta_id should be NULL and user_id should be the ID of your new user for both entries.

    1)
    meta_key: wp_capabilities
    meta_value: a:1:{s:13:"administrator";s:1:"1";}
    
    2)
    meta_key: wp_user_level
    meta_value: 10
    

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

提交回复
热议问题