Search code examples
mysqlwordpressvps

Wordpress - The username is not registered on this site


I'm hosting a Wordpress instance on a VPS with MariaDB. Everything seemed to work fine until now where I will try to log into my account but it says,

The username {name} is not registered on this site. If you are unsure of your username, try your email address instead.

I've never gotten this error before so I checked the MariaDB and the user is in the wp_users table. I even changed the password to make sure the password was correct. Any help is appreciated! and thank you in advance.


Solution

  • You can also create a new admin user from SSH access into your VPS.

    For this:

    1. Go to your website root directory.
    2. Run the following command:

    wp user create $username $emailaddress –role=$role

    Be sure to replace the ($username and $emailaddress) example values with your own custom values and ($role) the role you would like the user to be configured with. When the command completes running, a password will be returned, as in the example output below:

    [email protected] [~/public_html]# wp user create exampl3 [email protected] –role=administrator Success: Created user 2enter code here Password: srWCdc3c*(&b

    Refer to the table below, to determine what each role’s capabilities are. This will help you to choose which role to set as the user in the command above.

    Role Description

    Super Admin Can access all administration features (including site network administration). Administrator => Can access all administration features (within a single site). Editor => Can publish and manage posts (including posts by other users). Author => Can publish and manage their own posts. Contributor => Can write and manage their own posts (but cannot publish). Subscriber => Can only manage their profile.

    After creating your account, try to log in again.

    Hope this will fix your issue.

    Regards