Skip to content

Instantly share code, notes, and snippets.

@anova
Created May 15, 2019 10:57
Show Gist options
  • Save anova/afd532d77ada19cf5cfa539c6fa583b8 to your computer and use it in GitHub Desktop.
Save anova/afd532d77ada19cf5cfa539c6fa583b8 to your computer and use it in GitHub Desktop.
Change db prefix wp-admin inaccessible.
-- https://www.bishoy.me/changed-wp-table-prefix-now-cannot-access-wp-admin/
-- http://www.neoegm.com/tech/wordpress/how-to-fix-the-you-do-not-have-sufficient-permissions-to-access-this-page-message-in-wordpress/
UPDATE `new_prefix_wp_usermeta` SET `meta_key` = REPLACE(`meta_key`,'old_prefix_wp_','new_prefix_wp_');
UPDATE `new_prefix_wp_options` SET `option_name` = REPLACE(`option_name`,'old_prefix_wp_','new_prefix_wp_');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment