Categories: Blog

How To Solve “You do not have sufficient permissions to access this page” after a DataBase Prefix Change

Can't log into you WordPress Dashboard after a Database Prefix change?

If you ever changed your database prefix from the default one of wp_ to something else for example newp_ and tried to login into your WP DashBoard afterwards you may have received this warning.

Well, even though you may have changed your database table prefixes from the old wp_ to the new one newwp_ there are still some meta_key and option_name values that didn't get updated to the new database prefix.

In order to deal with this issue you must manually update those records by logging to your database phpmyadmin and run the following two sql statements:

UPDATE `newwp_usermeta` SET `meta_key` = REPLACE( `meta_key` , 'wp_', 'newwp_' );
UPDATE `newwp_options` SET `option_name` = 'newwp_user_roles' WHERE `option_name` ='wp_user_roles'

where newwp_ is your new WordPress Database prefix and wp_ is your old one.

When done try to log into your WP Dashboard once more and you'll be glad to see that it works 😉

Makis Mourelatos

WC Athens 2016 co-organizer, WP Support and Security Aficionado, Wannabe Kitesurfer.

Share
Published by
Makis Mourelatos

Recent Posts

WordPress Theme Development

WordPress is a widely popular Content Management System (CMS) that powers over 40% of all…

2 years ago

WordPress Solutions

WordPress is a popular platform that empowers more than 60 million websites worldwide. Millions of…

2 years ago

WordPress Site Maintenance

In this article, we will cover ten crucial WordPress site maintenance tasks that every website…

2 years ago

WordPress Security Solutions

In this blog article, we will explore the various WordPress security solutions you can implement…

2 years ago

WordPress Plugin Solutions

Plugins are an integral part of WordPress, as they offer countless benefits and features that…

2 years ago

WordPress Optimization and Performance Improvement

In this article, we will explore various strategies that can help you enhance your WordPress…

2 years ago