According to a study, more than 80% of wordpress webmasters don’t change default database prefix. By default wordpress database prefix is set to wp_ which means that every table in the database is going to have wp_ in its start. This is not a good practice. Leaving this unchanged will definitely result in some serious security issues in future.
This makes easy for hackers out there to assume that you have left the wordpress table prefix unchanged and execute a sql injection attack for wp_ prefix.
How to change wordpress DB prefix
Changing wordpress database prefix from sql commands can become a little tricky if you have a lot of plugins installed. Almost every plugin requires to store data and wordpress allows that plugin to make its own table within the database. By default wordpress has about 12 tables and if you install about 30 plugins, the number of database tables can go upto 42 which makes it a lot more tough to edit all tables.
As all of us know that our beloved wordpress cms is the most flexible Content Management system out there. This flexibility is all because of the plugins those are available in the number of millions.
In order to change the default wordpress database prefix, there is a plugin available which can make this job very easy. All you have to do is follow the steps given below.
- Login to wordpress dashboard as admin account.
- Click on Plugin -> Add new
- Search for “Change DB prefix”
- Install the plugin shown in the image below.
- Navigate to Settings -> Change DB Prefix
- Now all you have to do is change the prefix to whatever you want it to be.
Note: The database prefix can only consist of Alphabets, Numbers and Underscore only. We do recommend you to remove this plugin after you have changed the db prefix.
- MGeeky for making this guide
- Ms. Bhumi Shah for making this fantastic plugin.