[resolved] Renaming WordPress tables simplified (2 posts)

  1. scottsemple
    Posted 5 years ago #

    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?

  2. elfin

    Posted 5 years ago #


    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.

Topic Closed

This topic has been closed to new replies.

About this Topic