How do I remove an Administrator from my Wordpress blog?

I found a strange username in my profile that seems to have replaced my info with his/her info, “DmfIR”

When I found the name among Users and tried to delete, I got the result:

Delete Users

You have specified this user for deletion:
ID #98: DmfIR The current user will not be deleted.
There are no valid users selected for deletion.

How do I delete this user? I generated a new password too.

Hi,

“Current user” could mean that Wordpress think you’re trying to delete your self.

Maybe create a new admin account and log out and try delete the malevolent user when logged in as the new admin?

I think you should act as if your site is compromised and check eventual logs for suspicious traffic.

Also check that the account you’re going to delete doesn’t have content that also is going to be deleted.

1 Like

The account has 0 pages in its account while my account has 95, so it does make a difference. It’s a different account.

I’m afraid to log out lest I not get back in.

Check if you can log in with the new admin without log out this account, then try delete the problem account from there.

Maybe you could also try remove all of it’s privileges if that makes any difference.

Could it be your account that’s got a new user name?

I’ve haven’t managed WP for a long long time, so I’m not sure how it works nowadays. :blush:

I guess, if you use another token when you log in it could somehow actually be a new alias on your account.

Then the solution could be to simply change it back. :thinking:

Can you change that user’s details?

I managed to add a new email and password, and log back in with those creds. But the username still can’t be deleted.

However, there may be a way by using PHPMyAdmin to do it.

I can and did. Also make a new password for it and changed it. Theoretically, s/he can’t use his username to log back in. Still can’t change the username, though.

Have you checked your site for malware?

1 Like

No, I’ll have to try that!

This site says it is clean: https://quttera.com/website-malware-scanner#

I scrambled the username and password using this page: https://mekshq.com/how-to-change-wordpress-username/

Could you use the how-to’s instruction to deleted the user too?

Yes. It would be in the users and users_meta tables. Before deleting from the users table, get the user_id and look for that ID in the users_meta table and delete that row first. Then delete from the users table. You may want to change the name associated to the pages and posts to your name in the posts table if you like.

1 Like

users_meta for ID 98 has quite a few rows. first_name, last_name, etc. Delete all of those?

Depending on how old your WP is, the column name in wp_posts is post_author. You can delete all those posts or just leave it as is with the ID

Once you delete the user from the wp_users table, those posts will still be there but no author will be displayed. At this point, you can either delete all those posts from the wp_posts table or just put someone elses ID in the wp_posts column

1 Like

I clicked on wp_posts and found wp_author. I sorted by ID and found 2 posts by ID 98. I deleted those.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.