Home > Wordpress > Change table prefix of Wordpress

3 steps to change table prefix:

1. Change table name

2. Update wp-config.php
#$table_prefix = ‘wp_’;
$table_prefix = ‘newprefix_’;

3. Run the following SQL:
Update newprefix_options set option_name = 'newprefix_user_role' where option_name = 'wp_user_role'
update newprefix_usermeta set meta_key = 'newprefix_capabilities' where meta_key = 'wp_capabilities'
update newprefix_usermeta set meta_key = 'newprefix_autosave_draft_ids' where meta_key = 'wp_autosave_draft_ids'
update newprefix_usermeta set meta_key = 'newprefix_user_level' where meta_key = 'wp_user_level'
update newprefix_usermeta set meta_key = 'newprefix_usersettings' where meta_key = 'wp_usersettings'



Flag Counter