Everybody Staze...

Nobody leavz...

  • Home
  • About Me
    • LinkedIn
    • Lab
  • Contact
  • Links
  • Reviews
  • Sitemap
  • Weather
You are here: Home / Archives for moving tables

Moving wordpress tables

2009/08/22 By staze

This also applies to renaming table prefixes within the same database.

Previously on my server, I had 3 databases that I used actively. One for this website, one for another, and one for my power/gas data. The two websites are both wordpress.

So, just a few moments ago, I consolidated those tables into one database. I had to change the table prefix for one of the sites so both sites tables could coexist within the same database (and not have collisions). After changing the wp-config.php to reflect this change, the site loaded up. The problem is, I tried to go into the admin page, and I get “You do not have sufficient permissions to access this page”.

A lot of the info on the wordpress site doesn’t really cover this issue. Luckly, this does. Basically, you need to go into the “usermeta” table, and change the “meta_key” values from the previous prefix_capabilities, and prefix_user_level, to the new prefix_capabilities and new prefix_user_level. Then go into the options table and change prefix_user_roles to the new prefix_user_roles.

Once that’s done, things should work. You can certainly use the SQL statements he has on his site, but I had a hard time following what he was saying. So, I did it by hand once I figured it out.

Thanks very much, and hopefully I’ll have more later tonight or tomorrow.

(p.s. Sorry about the quality of the camera image. I’m working on it…)

Filed Under: Coding Tagged With: moving tables, MySQL, Wordpress

Weather

Categories / Archives

  • Apple
  • Coding
  • Electronics
  • Energy
  • Home Ownership
  • Miscellany
  • Politics
  • Prius
  • Sys Admin
  • Travel
  • Uncategorized
  • Work
  • June 2026
  • April 2026
  • August 2025
  • April 2025
  • January 2024
  • February 2021
  • July 2020
  • January 2020
  • April 2019
  • March 2018
  • February 2018
  • June 2017

Copyright © 2026 · Staze On Genesis Framework · WordPress · Log in