How to change a database table name

One of my Wordpress plugins stopped working when I upgraded. I figured out it was because the database tables had the version number for the plugin in them, so the new version was looking for the new version number. I could’ve done a fresh install and lost all my info… or I could just change the table name.

There’s no obvious way to do this in PhpMyAdmin. I had expected an edit icon that would let me change the table name, but I guess that would be too simple. I did some digging and found the answer:

Select the database that contains the table you want to edit. Then click on the “SQL” tab at the top of the page and run this query

RENAME TABLE tbl_name TO new_tbl_name

Not quite as simple as having buttons to click and forms to fill out and submit, but simple enough.

Related posts:
  1. Optimize your database!
  2. How to merge blogs together
  3. Speeding up older WordPress blogs
  4. Automatically updating your Wordpress install
  5. Preventing MySQL Database Crashes

2 Responses to “How to change a database table name”

  1. affiliate.solutions said:

    I really liked your blog! You have some great content. Check out my blog and give me some feedback… I just posted a great blog about the 36 Best Wordpress plugins for 2009., thanks !

  2. Margie McGilty said:

    Nice post, always. I’ve been online trying to make money now for about 6 months and your blog is one of the best i’ve come across. Always great content.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>