How to change the prefix

How to change the prefix

If you have a site in WordPress, you need to take care of its safety. The database is vulnerable and is a target for hackers. To protect your site, you should change the prefix of the database given. In this article we will tell you how to do it.

1
To get started, create a backup copy of the database, in case you install something wrong. After that, go to wp-config.php. And change the characters in the tables. You will see the WP_ icon, which is by default. Add any numbers and characters after these letters. After that, get access to the database via phpmyadmin. Change the prefix in the tables to the new one, which was installed before that.

How to change the prefix

2
On the screen you will see several lines with table parameters. You need to change the symbols “wp_” in the lines with new ones. It is necessary that in none of them there is no reminder of the standard prefix. After replacing, test the site. If something does not work, try to repeat the steps using a backup copy.

3
To change the prefix, it is best to use a special WP-SSCAN WP-SECAN plugin., It will accelerate the process. To get started, install the plugin, it can be found in the WordPress security window. The new prefix is \u200b\u200binstalled in the Change the Current plugin window. After entering new characters, click Start Renaming. This will retain all the changes.

How to change the prefix

4
To replace the prefix, it is convenient to use the Table Prefix Rename Plugin plugin. When using this plugin, the process of change occurs in two stages. To begin with, go to the Settings window, then enter a new prefix for tables. This can be done by clicking on the New Table Prefix key. After entering new characters, keep the changes by clicking the changes in Generate New Tables. Go to the server, in the notebook open wp-config.php. Find the names of the tables and enter new characters to preserve changes Click Change Table Prefix.

How to change the prefix

5
Do not forget to get rid of old tables. To do this, enter the PHP Myadmin admin panel and find tables with old names. Mark them with flags and click Delete. After that, using the SQL queries search engine, change the prefix in the database. Enter new characters in the table, click Rename Table Wp_Posts to “New Symbols” _POSTS. This operation will change only one table, if there are several, then you will have to replace each.

6
Edit the Prefix_OPTIONS table. Request the search for files with the text of the update “New Prefix Symbols” _OPTIONS SET OPTION_NAME \u003d ’“ Name of the New Prefix ”C_USER_ROLES’ WRE OPTION_NAME \u003d ’WP_USER_ROLES’ LIMIT 1. It is necessary to produce this manipulation for each of the files that is used by the old standard prefix “WP_”. Make editing the configuration file by changing the prefix new.

Remember, the safety of the site should be in the first place. In most cases, the “WP_” request is found using automatic programs. To avoid hacker attacks, do not be lazy and change the prefix. It is optional to install new plugins for the replacement, but they greatly simplify the process.

Add a comment

Your e-mail will not be published. Mandatory fields are marked *

close