Support » Plugin: iThemes Security (formerly Better WP Security) » [Plugin: Better WP Security] Database prefix quirk

  • Hi,

    I updated the prefix to my database table to resolve some other problems I was having with the Gravity Forms plugin. Anyway, after updating the database table, then I had a problem with User Roles. I figured out what the problem was, but I wanted to share the solution and see if this is a potential bug that can also be fixed.


    I have a WPMU setup. I had sites where users were not displaying on the user page. Also, when I attempted to add users, I could not indicate which user role the new user should be given because the drop down just didn’t display.

    How I Fixed It

    I dug into my database, went to the specific MU blog and selected the “wpprefix_options” table. The “user_roles” entry had the wrong database prefix. I updated the prefix to the user_roles entry and my user roles and capabilities returned for that blog/site.

    Why I’m sending a support request to you even though I fixed my problem

    The prefix on the “user_roles” entry wasn’t the original “wp_”. It was a prior database prefix assigned by Better WP Security when I used it to automatically change my database tables previously.

    So my question is, is there a way to make sure that the “user_roles” prefix matches the new database prefix when someone automatically changes the database prefix using Better WP Security? Is this a feature that can be added to future versions?

    Also, is there a way to easily fix all of my “user_role” prefixes? Because I have other sites on this same WPMU install suffering from the same problem, and I would rather not go through each one individually. I only know enough about databases to make trouble and fix the occasional problem. Any help?

Viewing 1 replies (of 1 total)
  • Thank you for the report. I had thought this fixed a few issues back (hadn’t heard about it since). I’ll take a look again and see if I can make the login work a little better.

    As for a quick way to fix…

    …What I’ve done in these situations is create a dump of the database, do a search replace, and re-upload the dump as the curent database. You’ll be down for a couple of minutes but it has worked for me (just keep the original dump in case anything is corrupted so that you can restore.).

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Better WP Security] Database prefix quirk’ is closed to new replies.