“更改数据库前缀”wordpress插件错误/问题:将所有HTTP流量重定向到/wp-admin/install.php

I installed 'change db prefix' wordpress plugin (WordPress version being used is 3.7.1), which resulted in an error and has blocked all kind of http access to the site (domain as well as /wp-admin pages).

Got the following errors while installation - Changing value: mdv_user_roles in table mdv_options: Failed Changing values in table mdv_usermeta: Failed

This is what is happening now - Whether I try to log into my /wp-admin or just access domain directly I am redirected to /wp-admin/install.php (welcome screen to install WordPress) as if this is a new installation.

Findings - I logged into phpMyAdmin from cPanel and found that all tables have old prefix, which means none of the tables are changed to the new one. Makes sense, probably there was a db-rollback due to the db errors.

However, $table_prefix property in wp-config.php file was changed to new prefix. I changed it back to the old prefix and uploaded file to server.

I still get the same behavior though. Access to domain points back to /wp-admin/install.php file.

Anyone has come across this issue? Any help is greatly appreciated! Thanks.

  1. Uninstall plugin or remove change db prefix plugin folder from wp-content/plugins.
  2. Change $table_prefix to new prefix.
  3. Go to phpmyadmin-> your db-> select each table and rename the table with your new prefix.

For more details refer this link- Change wordpress table prefix

1} Remove your plugin ( as you are not able to login in your wordpress admin panel ) then rename that plugin and try to login ... ( you can rename your plugin folder : wp-content\plugins\ -- your plugin -- name

2 } if in phpmyadmin you see your table prefix is changed by new prefix which you enter through plugin , then see which table is seen with old prefix ( just change that with new prefix : just clicking on resp table >> operation >> rename table name ) or vise-versa

3 } open WP-CONFIG.PHP and check for $table_prefix=your default or new prefix is what set.

4 } and if you have backup of your database then just replace it with current one and check.

Found the answer. To start with I was looking at the wrong DB and thinking that tables were not renamed by the plugin. They were.

Basically 'Change DB Prefix' seems to be a badly written plugin.

Cause - It was able to rename tables but somehow it appears to have added another '_' to the new prefix. And hence it could not rename the field values in _usermeta table.

Funnily enough the original prefix given for the plugin itself was wrong, in the sense there were no tables with the given 'original' prefix! So the plugin went and created another duplicate bunch of tables.

Basically db automicity was not maintained by this plugin. Makes me wonder how does one miss such basic principle of db mgmt and release a plugin.

Solution - After analyzing the issue with ever helpful Bluehost tech support, just dropped new tables and modified db_prefix in wp-config.php back to original value. This solved the problem.

Thanks Pranita and user2906577, for your valuable time trying to solve this issue.