How to remove or change a database table prefix

Every so often you need to change your database prefix, whether it’s because you need to secure your WordPress website a little bit, or you want to make it easier to identify which tables are for what. Regardless, you need a simple way to change or remove your database table prefix. This article will tell you how to do that using phpMyAdmin.

Also read: #1067 – Invalid default value for ‘post_date’ or Anything [FIX]

Don’t try to change table prefix on a live website.

HOW TO CHANGE A DATABASE TABLE PREFIX

  1. Log into PHPMyAdmin
  2. Select the database you wish to work with
  3. Click on the “Structure” tab; all or most of your tables should be listed
  4. Go to the bottom of the screen, click on “Check all”
  5. Change the select box next to it and select “Replace Table Prefix”
  6. A modal will popup
    1. In From, enter your old prefix
    2. In To, enter your new prefix
    3. Click the “Continue” button
  7. Wait for phpMyAdmin to finish

HOW TO ADD A DATABASE TABLE PREFIX

  1. Log into PHPMyAdmin
  2. Select the database you wish to work with
  3. Click on the “Structure” tab; all or most of your tables should be listed
  4. Go to the bottom of the screen, click on “Check all”
  5. Change the select box next to it and select “Add table prefix”
  6. A modal will popup; in the field enter your prefix
  7. Click the “Continue” button
  8. Wait for phpMyAdmin to finish.

You will be able to change DB prefix for WordPress websites using this method.

That’s it! You’ve just changed your table prefix. Please keep in mind don’t try to change the table prefix on a live website or running instances. Do this locally or on a Beta website. After confirmation, you could do these changes on a live website.

Follow TechBiriyani on FacebookTwitter to get all the latest updates.

Leave a Comment