WordPress.org

Ready to get started?Download WordPress

Forums

how to safely change database table prefixes (10 posts)

  1. idowu
    Member
    Posted 2 years ago #

    hello,
    please i will love to know the best method or plugin i can employed in order to safely change my tables' prefixes, both the 'wp_' and 'wp_bp_' prefixes.

    thanks all

  2. Prayer, a lot of alcohol, and a masseuse.

    Seriously, though. Don't unless you have a pressing need. And you never, ever, have a pressing need.

    How? Okay, but you'll regret it!

    Make a backup of the DB first.

    1) change all the table names via phpMyAdmin or any other DB tool.
    2) search for wp_ and wp_bp_ and replace it with the new one.
    3) Edit your wp-config.php to point to the new prefix.

    If it works, you're lucky. If not, well, I wouldn't be surprised.

  3. Nevis-1
    Member
    Posted 2 years ago #

    Well that was helpful...not at all. :(

  4. Hey, it's like asking 'How do I change my power train in my car?'

    The three steps I outlined ARE how you do it. I just never would even consider it seriously. I've never heard a reason why I should try.

  5. idowu
    Member
    Posted 2 years ago #

    hello, i was thinking changing the prefixes will offer an additional layer of protection against attacks.
    please enlighten me. i have bothered to try it, and i dont think i want to try. i will heed your advise.

    but please enlighten on how i may protect my database files.

    thank you

  6. i was thinking changing the prefixes will offer an additional layer of protection against attacks.

    Nope, doesn't help one iota. What it does is provide 'security by obscurity' and even then, it doesn't. Remember, WordPress has to know what the DB prefix is, right? Well, in order for plugin devs to be able to write to your database, we tell them not to hard code the e WordPress database table prefix, and to use the $wpdb->prefix variable instead. So now if I'm an evil hacker, I'll just use that :D

    but please enlighten on how i may protect my database files.

    Good passwords, good server security, separate SQL IDs.

    By the last one what I mean is make a separate ID for your SQL connections (like I use ipstenu_sql). That account CANNOT be logged into, it ONLY exists to use SQL, and it has an insanely random password that I can't remember and have to read my wp-config.php file to grab.

    Then, if you have WP installed in the root of your site (in the public_html folder), you can move the wp-config.php file one level UP. Read http://codex.wordpress.org/Hardening_WordPress#Securing_wp-config.php

    Finally, only use good plugins. Personally, I know I'm not clever enough to spot an SQL injection, but I know that any plugin that uses DB inserts is one I should take a second look at, or ask my friends who ARE good at that, to review.

  7. idowu
    Member
    Posted 2 years ago #

    Good passwords, good server security, separate SQL IDs.

    By the last one what I mean is make a separate ID for your SQL connections (like I use ipstenu_sql). That account CANNOT be logged into, it ONLY exists to use SQL, and it has an insanely random password that I can't remember and have to read my wp-config.php file to grab.

    please can you explain the above further. how do i set up separate SQL IDS and use them.

    and one more thing, i am thinking of SSL set up, will that be of help in securing my blog.

    thank you very much

  8. Ask your webhost how to make an SQL only ID. They should know how (and there are multiple ways, not all of which work on all hosts).

  9. idowu
    Member
    Posted 2 years ago #

    hello,

    still on separate SQL IDs. is the SQL ID different from the DB_USER and DB_PASSWORD set in wp-config.php file? if it ithe same thing you are talking about, cant i change it there to something i want.

    thank you.

  10. It's the same thing as the DB_USER :)

    You can change it to whatever you want, but you have to make the new DB USER first. And the DB User is an SQL ID :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.