Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Rename a Table in phpMyAdmin

This guide shows you how to change the name of a database table using phpMyAdmin, in a few easy steps.

How-To Guides2 min read8 steps

What are these things?

A database is like a big filing cabinet that stores your website's information. A table is one drawer in that cabinet. For example, one table can hold all your users.

phpMyAdmin is a web tool that lets you look at and change databases with your mouse. You can open it from your hosting control panel.

Warning: Many apps, such as WordPress, look for tables by name. If you rename a table they use, your site may break. Take a backup first. In phpMyAdmin, use the Export tab to save a copy of your database.

Steps

  1. Log in to your hosting control panel.
  2. Open phpMyAdmin. Look in the Databases section.
  3. In the left list, click the name of your database.
  4. You will see all tables. Click the table you want to rename.
  5. Click the Operations tab at the top.
  6. Find the box named Table options. It has a field called Rename table to.
  7. Delete the old name and type the new name. Use letters, numbers and underscores. Avoid spaces.
  8. Click Go. phpMyAdmin shows a green message when it works.

Rename with a SQL command

SQL is the language used to talk to databases. You can also rename a table by typing a command in the SQL tab.

RENAME TABLE old_name TO new_name;

This command changes the table called old_name to new_name. Replace both words with your own names.

If your site breaks

  • Rename the table back to its old name using the same steps.
  • If a script uses the table, open its settings file and update the table name there too.
  • Restore your backup if you cannot fix it.

Quick recap

  • Back up your database first.
  • Open phpMyAdmin and select the database and the table.
  • Go to Operations and type the new name in Rename table to.
  • Click Go.
  • Update any app that still uses the old name.