1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How Do I Setup The Table Prefix For My SQL Database For Wordpress

Discussion in 'Blogging' started by meakerseeker, Jan 12, 2011.

  1. meakerseeker

    meakerseeker Regular Member

    Joined:
    Jan 3, 2010
    Messages:
    385
    Likes Received:
    24
    I'm doing a manual install of wordpress & have already setup my MySQL
    database using the database wizard & nowhere in the database setup
    was there a way for me to pick my own table prefix.

    I previously installed wordpress using my hosts software installer & then used the plugin
    "WP Security Scan" & it warned me about the table prefix wp_ needing changed.

    I'm trying to set it up correctly the first time to prevent
    SQL injection attacks from being performed.

    I emailed my host & they said that wordpress sets it up on it's own I know it does wp_

    How can I set it up correctly the 1st time during the manual install it's a pain to change
    once it's setup wrong.
     
  2. creep

    creep Registered Member

    Joined:
    Apr 8, 2009
    Messages:
    87
    Likes Received:
    40
    You have the option to change the table prefix in the wp-config.php file that is situated in your wordpress directory.
    Modify "wp" in the line below:
    $table_prefix = 'wp_';
    with whatever you want.
     
    • Thanks Thanks x 1
    Last edited: Jan 12, 2011
  3. meakerseeker

    meakerseeker Regular Member

    Joined:
    Jan 3, 2010
    Messages:
    385
    Likes Received:
    24
    Thanks I'll do that, this all started because of a warning from the
    plugin "WP Security Scan" about the table prefix & a sql injection

    Have you ever heard of a wordpress blog hacked by a sql injection
     
  4. creep

    creep Registered Member

    Joined:
    Apr 8, 2009
    Messages:
    87
    Likes Received:
    40
    Of course,a lot of blogs get hacked, especially if they are running older versions of wp, plugins, weak password, etc...
    But if you implement all the suggestions by WPsecurityScan your should be pretty safe though.
     
    • Thanks Thanks x 1
  5. meakerseeker

    meakerseeker Regular Member

    Joined:
    Jan 3, 2010
    Messages:
    385
    Likes Received:
    24
    I'll do that thanks for the help.