WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've heard this meta key is obsolete, but they are still getting created every time a user registers. Can I prevent this? I'm trying to slim down that table.

share|improve this question

User levels are deprecated, not obsolete. Deprecated features should still be expected to work but should not be used in new code. The point of deprecation is to provide code authors time to update software and thus avoid breakages when the deprecated feature are finally removed.

Leave this alone.

Besides which, it is a very insignificant "problem" you are trying to solve. MySQL can handle a lot of data in a table.

share|improve this answer
I disagree that 20,000 unnecessary rows are insignificant. We're experiencing instability due to the size of some of our tables and removing unused rows has been helping. Whether the rows in question are actually unnecessary is another matter. Sounds like they are necessary for backwards compatibility reasons. If we aren't installing any new plugins/3rd party code, is there any harm in removing them? – emersonthis Apr 25 '13 at 15:03
user_level shows up 36 times in 3.5.1 core-- grep -Rni 'user_level' * | wc -l. Some of those lines are comments but most aren't. It would take a fair bit of code analysis and experimentation to determine if any of that is actually used by the Core, or if it is all for backwards compatibility. I wouldn't remove them without thorough testing. If you have 20,000 you must have at least that many users, which makes for a very large site. Still, I would think that well built indexes and decent queries will do you more good than removing those lines. – s_ha_dum Apr 25 '13 at 16:57

Emerson, I'm running into the same sort of issue with the network I work on and the wp_usermeta table has seemed to be the main cause.

I'd love to compare notes with you on what can be done about it. If you're interested contact me on twitter first, username pap3rtig3rs

share|improve this answer
I'm not on twitter a ton but feel free to hit me: @secretdesignpro . We ended up trimming a lot of wp_usermeta bloat with filters. – emersonthis Jul 20 '13 at 20:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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