Manually Change The Wordpress Table Prefix

Ahem, WP Prefix Table Changer plugin is the great one. This tool will automatically change the default database table prefix to mitigate zero-day SQL Injection attacks. But unfortunately, not be a bit guys (include me) which has reported that they were unable to change their default Wordpress table prefix through that plugin. Generally, they’re get error message look like: “Your User which is used to access your Wordpress Tables/Database, hasn’t enough rights (is missing ALTER-right) to alter your Tablestructure”, so it mean we need another technique to encounter this problem. In actual fact, Blogsecurity.net in their Secure WP Whiteaper has briefly described to us about alternative technique which manually change the default Wordpress Table Prefix on our wordpress existing installation with a few additional steps. But, that method have potential risk to bite into our database, also requires not a few time to do so, why? ’cause some guys, like me too, have a bunch plugins which has been installed on their own blog, and of course it using the default wp_ prefix too, one of these are firestats.

By the way, i am successfully changing the default prefix (wp_) using my own method, see below:

  • backup your wordpress database (i’m using phpmyadmin) to an *.sql file.
  • open that *.sql file (make another copy first) using text editor, then find and replace all “wp_” prefix to “something_”, save it.
  • now, drop all tables of your wordpress databases (don’t drop the database), of course it will make your wordpress database doesn’t have table (zero table).
  • import the *.sql file which has been edited before into your wordpress databases through phpmyadmin.
  • and lastly, edit your wp-config.php file and change the $table_prefix = ‘wp_’; to $table_prefix = ’something_’;
  • done ! ;)

…it work perfectly for me !

Oh shit, i’m forgot to tell you a thing, by using technique above, your all plugins will be deactivated automatically, so you need to re-activated them.

4 Responses to “Manually Change The Wordpress Table Prefix”

  1. Response by Jonathan
    From Chicago United States on at 4:10 pm
    Using Navigator Navigator 9.0.0.3 on Windows Windows 98

    Hi, tha’s a nice tricks to changing the default wordpress.org prefix table, evenless since not a little bit people has got the error message when try to change their wp prefix using WP Prefix Table Changer plugin, or change it manually. Thanks a lot for that !

    -Jonathan

    The latest Jonathan’s blog post is Testimony

  2. Response by Alex
    From Minneapolis United States on at 7:02 pm
    Using Internet Explorer Internet Explorer 7.0 on Windows Windows XP

    yeah, your method will work fine, its a great idea ;). but i think its more risky to do since the blog owner will dropping their all tables.

  3. Response by Luigi
    From Frosinone Italy on at 9:13 pm
    Using Opera Opera 9.20 on Windows Windows Vista

    Ciao, got this url on Sherif Elsisi blog. I agree with Alex, this is a nice hack. Before using your step, i use a way written by Sherif Elsisi on his blog http://tdot-b..-wordpress but some wp_ prefix table still exist over there, like wp_user_level, wp_capabilities, wp_capabilities, wp_user_level, and wp_autosave_draft_ids.

    And your steps above has renamed all these tables, everything is running so fine, now ;).

    Thanks,
    Luigi

    The latest Luigi’s blog post is Sembra di essere tornati al 96

  4. Response by Stanch
    From Jakarta Indonesia on at 10:59 pm
    Using Safari Safari 3.0.4 on Windows Windows Vista

                 Alex wrote:

    i think its more risky to do since the blog owner will dropping their all tables.

    yep, you’re right, but as mentioned above, I had suggested and/or told to take a backup first :pis

Leave a Reply



:) :( :d :"> :(( \:d/ :x 8-| /:) :o :-? :-" :-w ;) [-( :pis more »




RECENT ISSUE

MY SPONSOR

MY PARTNER