Title: [Plugin: WP Security Scan] Table prefix renaming simplified
Last modified: August 19, 2016

---

# [Plugin: WP Security Scan] Table prefix renaming simplified

 *  [scottsemple](https://wordpress.org/support/users/scottsemple/)
 * (@scottsemple)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-wp-security-scan-table-prefix-renaming-simplified/)
 * If a site owner would like to rename the standard wp_ prefix in their database
   for security reasons, I think there may be a simpler way than is usually prescribed.
 * Is there any reason the following would not work?
 * # Export the database;
    # Open the SQL file with a text editor; # Find and replace“
   wp_” with “newPrefix_”; # Import the renamed SQL file into the database; # Edit
   the $table_prefix variable within wp-config.php from “wp_” to “newPrefix_”; #
   Drop (delete) the old tables prefixed with “wp_”.
 * Any reason that wouldn’t work?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [thowden](https://wordpress.org/support/users/thowden/)
 * (@thowden)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-security-scan-table-prefix-renaming-simplified/#post-1767851)
 * Yes that does work. The only thing I would caution is that a global search and
   replace of wp_ will find entries within the tables which is not what we want.
 * I used phpmyadmin to export the database and that used a single backtick around
   the table names. The backtick will not show here as it is used to flag code so
   I’ve used the normal quote for the example.
    `'wp_tablename'`
 * Selecting the first backtick and the existing prefix ‘wp_ and replacing it with‘
   newprefix_ will ignore the wp_ field entries and only select the table names.
 * Depending on the tools you use this may require some variations but the basic
   export, change, import process will work.
 * Of course on an active blog site you may want to block the site for the 10 minutes
   that this will take so that you do not lose any entries or comments.
 * Tony
 *  [q292u](https://wordpress.org/support/users/q292u/)
 * (@q292u)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-security-scan-table-prefix-renaming-simplified/#post-1767856)
 * I used this plugin last week to rename my tables from wp_ to xx_.
 * I then found that I was locked out of the wp-admin system entirely.
    Renaming
   the tables back to wp_ made no difference.
 * The rename had also renamed all FIELDS within the tables starting with wp_ to
   XX_ !!
    So the wp-user-roles became xx-user-roles etc. Tables affected included
   wp-user and wp-user-meta..
 * I’ve now MANUALLY corrected the mess. About two hours wasted.
 * (Yes, I COULD have restored my current database backup, but then I’d have had
   to repopulate the posts from that backup onward. It’s a dynamic site.)
 * REALLY, NOT IMPRESSED.
 * Advice to potential users of this plugin: DON’T BOTHER.
 * Rename the tables manually.
    Update wp-config.php manually.
 * Rename the admin user to something else.
    Make sure you have a backup admin user
   just in case.
 * Make sure you have up-to-date backups..
 * **REALLY, NOT IMPRESSED.**

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: WP Security Scan] Table prefix renaming simplified’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-security-scan_f2f2f2.svg)
 * [Acunetix WP Security](https://wordpress.org/plugins/wp-security-scan/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-security-scan/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-security-scan/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-security-scan/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-security-scan/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-security-scan/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [q292u](https://wordpress.org/support/users/q292u/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/plugin-wp-security-scan-table-prefix-renaming-simplified/#post-1767856)
 * Status: not resolved