WordPress.org

Ready to get started?Download WordPress

Forums

All In One WP Security & Firewall
[resolved] Change Database Prefix Locked Me Out of the Site (5 posts)

  1. ironlion37
    Member
    Posted 3 months ago #

    Hi,

    After changing the site's database prefix via AIOWPC, I logged out and cannot get back in:

    You do not have sufficient permissions to access this page.

    I have tried restoring the .htacess file with no effect. I also tried using the new database prefix in the original wp-config.php file and that doesn't work. (If I simply restore the original wp-config, it breaks the site because the db prefix is wrong).

    How can I get back in?

    Thanks!

    https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/

  2. wpsolutions
    Member
    Plugin Author

    Posted 3 months ago #

    So when you changed the DB prefix did you see any errors?

    Can you please log into PHPMyAdmin and do the following:

    1) firstly check if the tables in general have the new DB prefix?

    2) Then click on the "usermeta" table and look at the following entries:

    <dbprefix>_capabilities
    <dbprefix>_user_level
    <dbprefix>_user-settings
    <dbprefix>_user-settings-time
    <dbprefix>_dashboard_quick_press_last_post_id

    Do these entries contain the new or old <dbprefix>?

  3. ironlion37
    Member
    Posted 3 months ago #

    Those entries contain the old prefix. And there are other entries as well that contain the old prefix.

    I tried changing the entries you listed to the new db prefix and I get the same error message when trying to log into the site.

    What should I do?

  4. ironlion37
    Member
    Posted 3 months ago #

    Ok, nevermind. There were multiple instances of some of the entries. When I changed them all to the new db prefix, I was able to get in.

    I went ahead and changed other entries in the usermeta table with the old prefix to the new. Was that the right thing to do?

    Thanks.

  5. mra13
    Member
    Plugin Author

    Posted 3 months ago #

    yeah that should be fine.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.