WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Renaming WordPress tables simplified

[Resolved] Renaming WordPress tables simplified

  • scottsemple
    Member

    @scottsemple

    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 1 replies (of 1 total)
  • elfin
    Participant

    @elfin

    Yes:

    Find and replace “wp_” with “newPrefix_”;

    not every instance of wp_ should be changed.
    eg from wp_usermeta: meta_key of wp_user-settings
    is just one example of many.

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Renaming WordPress tables simplified’ is closed to new replies.