Changing database tables prefixes
-
Hello, You can test this massive problem out yourself.
Support team, Program Team, advanced WordPress team or advanced users
and you will see i am right, i think this issue is massive problem.
that somehow has been completely over looked.IF your moving hosts or just wanted to change your SQL table prefix back to “wp_” you cannot ever log back into your ADMINCP! ever again. In-fact if you want to change the table prefix to anything other than the prefix you installed your WordPress install with you cannot period.
So Why would this effect me your asking???
Well if your using your hosting accounts 1 click easy installer to install WordPress, and their table prefix is something else other than the one you originally used i am sorry to say your sites gone,
All your backups, SQL files are useless as you cannot login to the adminCP to even import the xml file. Changing the prefix in the config.php file is useless too, even changing all the table prefixes in the SQL database is a waste of time, Hope i have your attention now.
The bug (and I’ve tried it on 6 different wordpress sites)
my wordpress SQL was set to table prefix “nae_” so i wanted to change this back to “wp_” since i moved hosts, so i changed nae_ in the config file to wp_” saved the config file.
i then changed all the tables in the SQL database from nae_ to wp_ using phpmyadmin.
Now When trying to login to adminCP you get this message.
You do not have sufficient permissions to access this page.Your going to say this has been covered and solved before right?
Well if you can come up with a solution you are amazing here’s my next steps,I know you need to change the prefix not only in the tables but in the data as so many previous threads exist about this.
I changed ONLY the names NOT the data i.e. i never touched or altered the user level, administrator passwords, salts, hashes, just nae_ to wp_ on the following locations.
wp_usermetanae_capabilities to wp_capabilities
nae_user_level to wp_user_level
nae_user-settings to wp_user_settings
nae_user-settings-time to wp_user-settings-timeThere was nowhere else in my database that had anything else to do with nae_ that wasn’t now changed to wp_ prefix.
The website loads, i login as a normal user, soon as i try to login as a admin i get the sorry you don’t have the right privileges.
So i change back all the table prefixes from wp_ to nae_
i change back the prefix in the config.php file to “nae_”My site works again, My Admin account works again.
Try it yourself, you cannot now for some reason EDIT or change your table prefix in the SQL database to anything other than the one you installed wordpress too.
WHY??? am i missing something here? I’ve gone over every single step then reversed the steps, so i know I’m not missing anything.
i even did a textString search for nae_ nothing was found so i couldn’t of missed a table or any data entry.
I Even tried creating a NEW Admin Account through SQL it creates the admin account with admin privileges just the same problem.
So your stuck with the table prefix you previously installed your website with,
-
Decided to dig even deeper, since this was annoying me.
made a new website a clone then used beyond compare to see differences.on page 9 on wp_options >> – option_name
there is a well hidden cell called “wp_user_roles”IF you cannot find this search in phpmyadmin for “user_roles”
this is where the last field was that needed to be changed from nae_ to wp_You can now log back in!! i hope this reference helps people.
so make sure once you change the followingwp_usermeta
nae_capabilities to wp_capabilities
nae_user_level to wp_user_level
nae_user-settings to wp_user_settings
nae_user-settings-time to wp_user-settings-time
You must also change it in the well hidden 9 pagewp_options >> user_roles
The topic ‘Changing database tables prefixes’ is closed to new replies.