How to Easily Change the WordPress Database Prefix

A basic security change to make on your child sites is to change the WordPress database prefix. The default WordPress database prefix is normally wp_. An easy plugin to be able to change all of the database tables on a sites database as well as update the prefix table value in the sites wp-config.php is by using the Brozzme DB Prefix & Tools Addon plugin.

After the plugin has been installed and activated it will add a menu item;


Before you change the WordPress database prefix you should create a database backup of the sites database you can do this from phpMyAdmin or using a plugin like WP Migrate DB.

In order for the plugin to work correctly, you will need to make sure that the sites wp-config.php file is writable and that MySQL has altered rights. In the plugin settings page, you will see the current WordPress database prefix then you can select the prefix you want to use or have the plugin to randomly create one if you.

After the change has run it will show that the database table prefix was able to be changed and also the table prefix would have been changed in the sites wp-config.php file.

Manage all your WordPress sites with the MainWP Dashboard

WordPress Management for Professionals

Are you ready to go Pro?

All MainWP Pro Extensions are available through one of our convenient bundled packages.

$table_prefix = 'p43sd3_';

Changing the sites database prefix will mean that your site will be less likely to be hit by spammers or hackers running scripts that would try to target the default WordPress prefix of the database on SQL injections. Since the database prefix of the tables has been changed then that part is less likely to be guessed. So taking the time to change the database prefix on your child sites is an easy and quick security change to make.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Looking for something?

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.