Lost (Some) Admin Privileges (11 posts)

  1. Alberto
    Posted 3 years ago #

    Hello Everyone!

    I have (somehow) lost partial administrative privileges to my WP site. I was hoping you guys could give me a hand? I am currently able to:

    - Login as an admin
    - Edit current posts and pages
    - Change general settings

    However, I am unable to:

    -Create new posts or pages (can "submit for approval")
    -Create new users

    I have attempted a number of potential solutions, but have had no luck thus far. I have tried to:

    - Disable all plugins
    - Change the theme
    - Set admin settings to a:1:{s:13:”administrator”;s:1:”1″;} through phpMyAdmin (was already set)
    - Change the new-user registration settings to "Admin" in an attempt to create a new site admin (didn't let new users signup)

    At this point I've ran out of ideas... I suspect the issue might have something to do with my usage of WP-Members (Site | Plugin), which allows for visitors to create accounts in the site. However, I've disabled this (and other) plugins and the issue remains.

    Any ideas on what might help me obtain full admin privileges again?

    Thanks a lot everyone.

  2. Chad Butler
    Posted 3 years ago #

    Unfortunately, I can't tell you what the issue is. But I can tell you that WP-Members doesn't have any effect on user role (other than assigning the default role to users when they register).

  3. Alberto
    Posted 3 years ago #

    Thanks Chad - that is helpful, it at least narrows the possibilities.

  4. Knut Sparhell
    Posted 3 years ago #

    You could also compare your wp_options setting wp_user_roles with the ones on a clean install. First, substitute the above wp_ prefix with your actual prefix, if it's not the standard table prefix. The option_value in the same row as this option_name a quite long serialized array, usually with 5 main items.

    To get some fresh database tables to copy option_value content from you might just change your prefix in wp-config.php to, lets say test_. Install by accessing your wp-admin and go through it, then revert the change in wp-config.php, and use phpMyadmin to inspect the new test_options table, looking for test_user_roles. Delete all test_ tables afterwards. Have a complete backup for safety here!

  5. Alberto
    Posted 3 years ago #

    Knut - thanks a lot for the input there. I tried replacing the array in wp_user_roles with one of a clean install and continued to have the same limited admin rights issue.

    Here is what my wp_user_roles look like:


    See anything off here?

    To start off in the s:4:"name";s:13:"Administrator";s:12:"capabilities";a:70 line, the 70 was 63 in the clean install. Not sure what the significance of it might be here.

    Thanks again for all the help.

  6. Knut Sparhell
    Posted 3 years ago #

    Your available caps seems ok. Your wp_usermeta table should have wp_capabilities set to a:1:{s:13:”administrator”;s:1:”1″;} or a:1:{s:13:”administrator”;b:1:1;} for your user_id.

    To get a better view, install Capabilities Manager plugin (if you are allowed to). Administrator should have all caps in Capabilities, including "Publish Posts", "Edit Others Posts", "Create Users", "Edit Users" and so on.

    You are sure your active table prefix is "wp_"? No previous attempt to change it using a security plugin?

    Are you able to tell your blog to accept registrations under Settings > General? If so, and the default role is Administrator, when going to /wp-login.php?action=register what does it say?

  7. Alberto
    Posted 3 years ago #


    Thank you so much for your help on this one.

    I have my wp_capabilities (under the wp_usermeta table) set to a:1:{s:13:"administrator";s:1:"1";}, for user_id 1, so I think we are ok there.

    I installed Capabilities Manager (I am somehow allowed to) and confirmed that the Administrator has all capabilities enabled. I even created a new capability called "Super Admin" and changed a current account to it, to see if I could edit posts through that account, yet it still asks to "Submit for Review".

    I did not previously attempt to change my table prefix from "wp_" - haven't installed any security plugins there.

    I am able to accept registrations, and change the default role to Admin, but when attempting to create a new account through /wp-login.php?action=register, the site gives me an error: ERROR: Couldn’t register you... please contact the webmaster !.

    Running out of ideas :(

  8. Knut Sparhell
    Posted 3 years ago #

    Some case, this!

    But we still have a lot of options. We have the PHP error log to look at. Either you are able to set it up and find it, or you may install a debug plugin that catches them and displays them in a hidden div at front. No need to set WP in debug mode yet, as we are looking for serious errors happening, especially the one at registering a new user.

    You may also upload a clean WordPress, just to be sure the has been no file corruption or infection. Take a backup. Then delete all folders and files except folder wp_content (with content) and root file wp-config.php. Check everything again.

    You may dump all content tables, all native WP tables, except wp_options, wp_users and wp_usermeta, and except extra tables by plugins, if any. Create a clean, new blog by pointing to yet non-exsistent tables by setting a new db-prefix in wp-config.php, and finally import all content. You will have to reconfigure everything from the ground up, including users in the right order (by their previous ID, so that their ID remains the same).

    phpMyadmin should provide the tools.

    Tip: For a perfect and secure setup, have no user named admin and have a db prefix other than "wp_".

    Post back when you have some PHP error log data, before recreating the blog.

  9. Alberto
    Posted 3 years ago #


    Thank you again for the continued support.

    I am going to gather PHP error data and circle back. Sadly I am just getting home from the office -- the day job is leaving me with little energy and time to fix this problem. I am also just finding out that new users are no longer able to register to the site.

    But, enough whining. I really appreciate the help and will follow up with the PHP error data ASAP.

    Thank you,

  10. Alberto
    Posted 3 years ago #

    Knut Sparhell -- Wanted to thank you for all your help.

    I ended up taking the "easier" route and transferred the site to a new install. Took a few days, but I figured it was only a matter of time before this admin issue caused more trouble.

    Thanks again for all your help.

  11. davert
    Posted 3 years ago #

    I was experiencing the same problem. I triple checked the database against the old ones, nothing's showing up in the error logs, permissions are all good. Finally I found the problem -- a recommendation by a security plugin to add this to the wp-config...


    Funny, eh? That prevented upgrades, installing new plugins, and some other admin privs. Drove me nuts.

Topic Closed

This topic has been closed to new replies.

About this Topic