• Skip to primary navigation
  • Skip to main content

Managed WordPress Security for Pennies a Day. Call (619) 479-6637

Managed WordPress Security with Heart

MENUMENU
  • Why HackGuard.com? Why Choose HackGuard.com?
  • HackGuard.com WordPress Managed Services Rates WordPress Managed Services Rates
  • HackGuard.com Articles HackGuard Articles Library
    • Hack Guard Customer Testimonials
    • Top 20 WordPress Plugins to Avoid
    • How to Improve Junk Email Filtering at Gmail
    • WordPress 6.0.3 Security Release – Updated?
    • Why Should I Maintain My Own WordPress Website’s Backups?
    • About that “Weekly jQuery Migrate Status Update” email
    • How to Change a WordPress User from Subscriber to Administrator Role
    • WordPress 4.9.3 – Going into the tunnel and never coming out…
    • How Do I Migrate WordPress to a Different Domain Name?
    • Community Blogging: A Short Guide
    • WordPress Troubleshooting and How to Fix WordPress Errors
    • Is My Web Host Secure? Maybe not…
    • How to remove the subdirectory name from your WordPress website address
    • How can I improve the performance of my WordPress website?
    • How can I improve the performance of my WordPress blog (Part 2)
    • Protecting WordPress Against Brute Force Attacks
    • How do I reset my WordPress password?
    • How To Clear Cron Jobs in WordPress
    • xmlrpc.php and Pingbacks and Denial of Service Attacks, Oh My!
    • Free Website Monitoring Services, well, mostly free...
    • How to choose a secure web hosting company for a WordPress website
    • WordPress 404 Page Setup - Do You Have Five Minutes?
    • Can mod_pagespeed Improve Page Load Speed (external link)?
    • Yoast WordPress SEO Settings and Recommendations
    • Is Your Mom Missing Her BUMM?

cPanel

How to Change a WordPress User from Subscriber to Administrator Role

A rare situation, but in those rare instances when your website has been hacked and your WordPress user account has been changed from the role of Administrator to something else entirely, it may be easiest to simply change your WordPress user account back to Administrator using phpMyAdmin.

To change your WordPress user account from Subscriber to Administrator, first log into your cPanel. Then click the “phpMyAdmin” button.

cPanel phpMyadmin

 

You’ll see your list of installed databases at left.

phpMyAdmin List of Databases

 

If you are not sure which database your WordPress installation is using, then use your cPanel -> “File Manger” to “Edit” the contents of your WordPress configuration file, wp-config.php file.

WordPress wp-config.php Databae Name (DB_NAME)

 

Back to phpMyAdmin. Click your database and scroll down until you find the ‘usermeta‘ table.

WordPress Database Usermeta Table

 

My goal here is to change the user lmadmin1 from Subscriber to Administrator.

Wordpress Users List Subscriber example

 

Doing so is fairly easy.
After clicking the ‘usermeta‘ table, all I need to do is scroll down within the table until lmadmin1 appears in the list.

 

Ten or so lines below the user lmadmin1, is the line ‘user_level‘

WordPress Database User Level and Capabilities

 

To switch my lmadmin1 user from the role of Subscriber to Administrator, I have to do two things:

  1. Change the value from 0 to 10 on the ‘user_level‘ line
  2. Replace the ‘capabilities‘ meta_key value text with ‘a:1:{s:13:"administrator";s:1:"1";}‘

 

The moment I type or paste in the text and hit the enter key I should be able to jump back into WordPress and log in with full Administrator privileges.

Changing WordPress Subscriber to Administrator within the database using phpMyadmin

 

It’s really that easy!

Wordpress Users List Administrator example

 

 

 

 

Filed Under: Call (619) 479-6637 Tagged With: cPanel, phpMyAdmin, WordPress change user role, WordPress security, WordPress user role

Proactive WordPress Security Management for Pennies a Day™

© Copyright 2022 HackGuard.com™, HackRepair.com™,
The Hack Repair Guy™, Hack Repair Guy™
Copyright and Trademark Statement | Privacy Policy

Call HackRepair.com for website security help, (619) 479-6637.
Content Approved By Jim Walker, The Hack Repair Guy