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.

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

  1. affiliate.solutions says:

    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 says:

    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>

Don't miss an article!

 Subscribe in a reader or get every article delivered by email