Title: WP Database Show Index Error
Last modified: August 21, 2016

---

# WP Database Show Index Error

 *  Resolved [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/)
 * I have turned on
 *     ```
       define('WP_DEBUG_LOG', true);
       define('WP_DEBUG', true);
       ```
   
 * in my wp-config.php and when I try to activate short-url plugin I am getting
 *     ```
       Plugin could not be activated because it triggered a fatal error.
       WordPress database error: []
       SHOW INDEX FROM wp_pluginSL_shorturl;
       ```
   
 * Any idea why?
 * [https://wordpress.org/plugins/shorten-url/](https://wordpress.org/plugins/shorten-url/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/wp-database-show-index-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wp-database-show-index-error/page/2/?output_format=md)

 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856161)
 * Hum … You have a normal MySQL database ? The idea of that line is to test if 
   an index exist in that table and then delete it if it exists …
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856163)
 * Could you type this command directly in your database to have the full error ?
 *  Thread Starter [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856165)
 * No errors, I tried to run it via phpmyadmin and heidisql. No errors in both of
   them.
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856170)
 * Therefore it is very strange … And if you try to reactivate the plugin ? Sometime
   WP generates some random error
 *  Thread Starter [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856177)
 * Tried many times, but when I turn off the WP_DEBUG flags, it works. I tried to
   debug it but didn’t found the reason so I posted it here. I also noticed one 
   error.
 * Its in line 170 core.class.php
    `add_option("db_version", $db_version);`
 * I have added below line 161 core.class.php
    `global $db_version;`
 * to fix it.
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856188)
 * You are definitely right … it is a bug : I will release a new version in a couple
   of weeks to correct that.
 * Thanks a lot.
 * The “funny” thing is that the plugin is out for years and no one complain for
   that bug 🙁
 *  Thread Starter [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856192)
 * No problem. Any idea why I was getting the above error. I tried to debug it but
   not able to resolve it.
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856193)
 * When you add `global $db_version;` it does not solve the issue ?
 *  Thread Starter [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856194)
 * This one is solved. I am asking about the show index one.
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856199)
 * Oh sorry … I believed that you had only one error !
 * Definitely I do not know why WP generates an error while MySQL does not !!
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856215)
 * Do you have any index for that table ? If so, could you delete the index ?
    I
   have tried the same configuration without any error …
 *  Thread Starter [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856216)
 * No there are not any indexes for that table. Ok so I think no harm in that error.
 * Thanks for your help
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856218)
 * There is a harm here if you could not activate the plugin no ?
 *  Thread Starter [xforce](https://wordpress.org/support/users/xforce/)
 * (@xforce)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856219)
 * Yes when the debug flags are ON, I can’t activate the plugin. I have to turn 
   them off and then ON again.
 *  [Sed Lex](https://wordpress.org/support/users/sedlex/)
 * (@sedlex)
 * [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/#post-4856226)
 * IT IS STRANGE !!!
    I do not like it anyway …

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/wp-database-show-index-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/wp-database-show-index-error/page/2/?output_format=md)

The topic ‘WP Database Show Index Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shorten-url_ffffff.svg)
 * [Short URL](https://wordpress.org/plugins/shorten-url/)
 * [Support Threads](https://wordpress.org/support/plugin/shorten-url/)
 * [Active Topics](https://wordpress.org/support/plugin/shorten-url/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shorten-url/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shorten-url/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [wp_debug](https://wordpress.org/support/topic-tag/wp_debug/)

 * 18 replies
 * 2 participants
 * Last reply from: [xforce](https://wordpress.org/support/users/xforce/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/wp-database-show-index-error/page/2/#post-4856233)
 * Status: resolved