How To Change WordPress Database Table Prefix with Full Confidence

Learn how to change WordPress database table prefix

By default, WordPress database table prefix is wp_.

WordPress is open source and everybody in the world knows about it.

This information works for the advantage of hackers. They can do automated SQL injection attacks on database.

To avoid, update WordPress database table prefix from wp_ to something random, unique, and meaningless. So it cannot be guessed easily.

kinsta managed wordpress hosting
Pay Yearly, Get 2 Months FREE

WordPress Database Table Prefix Examples

  • wp_X5w4J9w3t8_
  • wp_z5Syr2P6_
  • wp_1793DJQ159_
  • wp_3C8b0Y1p_

WordPress database table prefix can only contain letters, numbers and underscores.

It’s not necessary that WordPress database table prefix start with wp_.

But it should end with an underscore.

Do not use these sample prefixes on live WordPress production blog’s.

convertkit email marketing tool
14 Days Free Trial

Steps to Change WordPress Database Table Prefix

Follow this method only if you have already installed WordPress.

Sample WordPress database table
  1. Deactivate all your plugins.
  2. Go to phpmyadmin and Select your database.
  3. Go to Export – select export method “Quick”, format “SQL” and download.
  4. Create a copy of file for backup, in case things don’t work out as required.
  5. Open file in a text editor.
  6. Find and replace wp_ to wp_mh46eu_ and save.
  7. Drop all tables from your database.
  8. Go to Import – upload file, select format “SQL”
  9. Open wp-config.php file in your home directory on your server.
  10. Find and replace wp_ to wp_X5w4J9w3t8_ and save.
  11. Now, re-activate all your plugins.
Live Chat Software
Improve Sales & Service with Chat & Ticketing System

If you have not already installed WordPress, simply change the prefix during WordPress installation wizard.

WordPress Consultant
If you want to Change WordPress Database Table Prefix, contact me.