I have attempted a few different ways (manually, using Brozzme's DB Prefix Tools & Addons plugin) to add a prefix to an older WP database (right now table names look like posts instead of wp_posts or stx_posts, etc.).

Strangely, no matter what way I do it, something breaks after adding the prefix. Everything is updated in wp-config.php fine to reflect the prefixes existence but when I attempt to navigate the admin side of things I get an error page instead:

"Sorry, you are not allowed to access this page."

This has me completely confused as adding a prefix to the tables shouldn't cause anything to change with user's permissions! Has anyone seen this problem before?

P.S. Not sure if this is relevant but the current host is Cloudways. I'm not sure how this would be involved but I've seen some weird caching issues with Cloudways. For example, I've deleted a file using SSH from the server, everything works, and then a little later the file is back.

1 Answer 1


In the $wpdb->prefix_usermeta table, there is a meta key called $wpdb->prefix_capabilities.

When users are created, the $prefix is hard-coded. You have to also edit the $prefix to the new one there.

So in your example

wp_capabilties becomes stx_capabilities. You must update it for all users.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.