When moving to a new hosting provider, specific settings at your new hosting provider can make or break your site. A good example of this is the naming convention your hosting provider uses for its database tables. To make things work, it might be necessary to rename WordPress database tables.
In most cases, all WordPress database tables begin with the
So, instead of having a database table called
What will you learn in this post?
I will show you how to:
- resolve the ‘You don’t have sufficient permissions to access this page’ error in WordPress
- rename WordPress database tables by using an SQL query
- rename keys within your database tables manually or by using an SQL query
- change the table prefix variable for your entire WordPress installation
The Problem of Insufficient Permissions
Problems arise when you don’t know about this peculiarity and attempt to move your existing WordPress installation, which uses the standard naming for its database tables, to a database newly created by GoDaddy.
What you end up seeing is this error:
You won’t be able to see any of your existing content. And you won’t even be able to log in to your WordPress Dashboard.
Rename WordPress Database Tables
To make this error message go away and gain access to your site’s content, you need to rename WordPress database tables, which GoDaddy generated, to the ones you used at your previous hosting provider.
In other words, you need to use the standard naming convention for your database tables.
To do this, access your WordPress SQL database via
Inside phpMyAdmin, click on the name of your database in the left pane and then click on the
Next, copy and paste the following query in the
Run SQL query/queries window:
RENAME table `wp_darvb96syk_commentmeta` TO `wp_commentmeta`;
RENAME table `wp_darvb96syk_comments` TO `wp_comments`;
RENAME table `wp_darvb96syk_links` TO `wp_links`;
RENAME table `wp_darvb96syk_options` TO `wp_options`;
RENAME table `wp_darvb96syk_postmeta` TO `wp_postmeta`;
RENAME table `wp_darvb96syk_posts` TO `wp_posts`;
RENAME table `wp_darvb96syk_termmeta` TO `wp_termmeta`;
RENAME table `wp_darvb96syk_terms` TO `wp_terms`;
RENAME table `wp_darvb96syk_term_relationships` TO `wp_term_relationships`;
RENAME table `wp_darvb96syk_term_taxonomy` TO `wp_term_taxonomy`;
RENAME table `wp_darvb96syk_usermeta` TO `wp_usermeta`;
RENAME table `wp_darvb96syk_users` TO `wp_users`;
Then click on the
This is how the visual layout of phpMyAdmin will look like:
There might be other tables present in your database, depending on the themes and plugins you use in your specific WordPress installation.
If you have extra tables, make sure that you include those in the above SQL query, too.
You need to rename all your tables to their correct names.
User Roles and Capabilities
There are two other key things that you must rename in your database.
And find the
You can either find them manually, click the Edit link next to them and rewrite their names.
Or you can use the following SQL queries to rename them:
SET option_name = REPLACE (option_name, 'wp_darvb96syk_user_roles', 'wp_user_roles');
SET meta_key = REPLACE (meta_key, 'wp_darvb96syk_capabilities', 'wp_capabilities');
darvb96syk_ prefix with the random prefix you have been generated.
Change Table Prefix in wp-config.php
And the last piece of the puzzle is changing the database table prefix variable in the
Access your server via FTP using WinSCP. You will need the account access name and password your hosting provider gave you when you first set up your hosting with them.
Make sure that the
* WordPress Database Table prefix.
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
$table_prefix = 'wp_';
Unless you make all these changes, you will get a “You do not have sufficient permissions to access this page.” and you won’t be able to use your site’s front end (publicly visible content) or back end (WordPress Dashboard) in any way whatsoever.
Liked this post?
Subscribe to our newsletter to receive early notification of new posts and deals: