You can reduce the chances of a successful SQL injection by changing the prefix of your WordPress database. We will explain how to do this.
What is a WordPress database prefix?
A prefix is the prefix of the table that stores the data in the database, and when you install wordpress, the default value is wp_.
Most WordPress sites use this prefix wp_. By changing this prefix, you can have multiple WordPress sites in one database and improve security.
What is SQL Injection?
SQL injection is a vulnerability in plug-ins and themes. If you continue to use a plug-in or theme with this vulnerability, an external party will send code to rewrite the above database and rewrite the database.
If the database is rewritten, the contents of the posts can be edited illegally or an unauthorized user can be created.
In this case, the hacker will specify the database to be rewritten using the prefix wp_, which is used by many WordPress, so if the prefix is different, the chance of a successful attack is reduced.
Since the number of SQL injection vulnerabilities is small compared to the total number of vulnerabilities, it is not mandatory to change the prefix, but it is recommended for sites that are very security-conscious.
Changing the Database Prefix
If you change the prefix by directly modifying the database, the privileges of the WordPress user are also saved according to the prefix, so you may not be able to log in or use the functions of the administration screen.
Also, since the prefix is set in wp-config.php, you will get a database connection error if you do not change this as well.
You can change the prefix using a plugin that automatically handles prefix-related processes such as these.
On the Add Plug-in screen, enter Brozzme DB Prefix & Tools Addons to install and activate the plugin.
Then go to Tools > DB prefix and specify the new prefix and press the Change button.
After the change, you may delete this plugin.
Please try again.
Free WordPress:Malware Scan & Security Plugin [Malware and Virus Detection and Removal].