How to change prefix database table name of WordPress?
2 ways to change the wordpress database prefix
- Use a plugin to change the database table prefix
- Rename wordpress database prefix using database query with PHPmyadmin
- Use a plugin to change the database table prefix
- Open the WordPress dashboard
- Click on the plugins and click on the add new button
- To change the database prefix via plugin search the brozzme DB prefix & Tools add-ons in the WordPress plugin
- Click on the install now button to install the plugin to your WordPress website
- Click on the activate button to activate the plugin.
- Go to tools from the left side and click on the DB prefix.
You can see the current prefix of the database there and change the database prefix which you want to change.
- Click on the Change DB prefix button and the prefix will change.
Please make sure that you can set the read/write permission for your web.config file. If the permissions are read-only then you will get an error because the plugin cannot change the database prefix into your file
2. Rename WordPress database prefix using database query with PHPmyadmin
Change the table prefix in web.config php
To your website’s ROOT folder open the wp-config file change the table prefix as WP
To edit the WP-config file, login via FTP/SFTP via filezilla.
You can see the below line in WP-config file.
$table_prefix = ‘wp_testing’
You can only add a prefix with numbers, letters, and underscore.
Rename database tables
Open your database via PHPMYADMIN on the left side you can see your database
- Select the database for which you want to change the table prefix into the wp-config.php and follow the below steps.
- Select the database.
- To select all the tables check the “check all” checkboxes
- Click on the drop-down and select “replace table prefix”.
- Enter the new table prefix into the filed of To.
- Click on the continue, after entering a new prefix and the table prefix will change.