I changed my prefix of my tables from the wp_ to something else for security reasons and good practice etc. I was curious most of new plugins installed take on the new prefix but I have one that refuses and still installs with wp_ it still works but i was curious is that normal practice or just a bad written plugin?

1 Answer 1


Short answer: Just a badly written plugin.

Longer answer: When a plugin calls the database in the right/correct/best practice way it uses Global $wpdb instead of just naming the database table, for example:

Wrong way

$sql = "SELECT * FROM wp_posts WHERE... "

Right way

$sql = "SELECT * FROM $wpdb->posts WHERE... "

this way it would work even if you change your tables prefix.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.