Migrating WordPress while changing table prefix

I’ve lost over an hour today on a macabre discovery: WordPress uses the configurable “table prefix” not only for table names, but for some key names in the user meta-data tables!

In a nutshell: when migrating WordPress with changing the table prefix, say, from the default “wp_” to “blabla_”, your user rights are going out the window – even your administrator user will be helpless like a newborn kitten. That’s because WordPress, when installing its tables, used the prefix to create a “wp_user_roles” entry in the wp_options table, and some similar entries in the wp_usermeta table. Yup, that’s basically a prefix-in-a-prefix scenario, quite ridiculous. To get everything running again, you’ll need to change all the “wp_*” entries in your new blabla_options and blabla_usermeta tables into “blabla_*” entries.

I cannot fathom why this was done in such a crazy manner…

CategoriesSinusoida, TechnicznieTags

wordpress


1. => Migrating WordPress while changing table prefix
2. Kod dla laika czy kod dla programisty?
< >
cloud: accor:

Group1

Leave a Reply

Your email address will not be published.

Connect with Facebook

Security Code: