Database security in Wordpress

In this example we will discuss about WordPress database security, We will cover all aspects of how to modify the WordPress default database prefix to get better security.

Database is a repository of every single information which is making by WordPress developer.

Many of developer in this list forgot to change prefix while installation of WordPress. This make very easy for spammers and hackers to plan a mass attack by just targeting default WordPress table prefix ” wp_“.

You can easily protect your database by changing the prefix of database table.

It takes few steps to apply changes in your WordPress database.

Step 1 : 

Open ” wp-config.php ”  file, and change prefix of the table

which is located in your  root directory of WordPress

Open wp-config.php file

Change table Prefix :

Change prefix code in wordpress wp-config file

Change the prefix line from “ wp_ ” to  ” wp_p012345

so our table prefix like this : $table_prefix  = “ wp_p012345;

Step 2 : 

In our next step we will change all database tables name

In our case we goto ” PhpMyAdmin ” ( database ).

Showing wordpress database table default prefix

Now change the prefix of database tables.

Apply a sql query operation to change all table prefix  like : “wp_p012345

Change wordpress database table prefix

After apply all of changes our database tables looks like this :

Database screen after default wordpress table prefix changed