Title: WordPress database error
Last modified: February 21, 2018

---

# WordPress database error

 *  Resolved [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/)
 * I am using WordPress with Apache2.4, PHP7.0.27 and MariaDB 10.1.14.
 * I am seeing two errors frequently in our apache error_log
 *  WordPress database error Table ‘wp_forum_topics’ already exists for query RENAME
   TABLE wp_forum_threads TO wp_forum_topics; made by require(‘wp-blog-header.php’),
   require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-
   settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->apply_filters,
   AsgarosForumDatabase->buildDatabase
 * and
 * WordPress database error Too many keys specified; max 64 keys allowed for query
   ALTER TABLE wp_forum_topics ADD FULLTEXT (name); made by require(‘wp-blog-header.
   php’), require_once(‘wp-load.php’), require_once(‘wp-config.php’), require_once(‘
   wp-settings.php’), do_action(‘plugins_loaded’), WP_Hook->do_action, WP_Hook->
   apply_filters, AsgarosForumDatabase->buildDatabase
 * Please advise how i resolve these errors.
 * Thanks
    Richard

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10002667)
 * Hello [@okappy](https://wordpress.org/support/users/okappy/)
 * I guess that those errors occur during an update. In the first one a database-
   table is renamed from wp_forum_threads to wp_forum_topics. It seems that this
   already has been done but the old table still exists. You can check via phpMyAdmin
   if there is still an old wp_forum_threads table and remove it.
 * The second problem seems to be that an index is create over and over again in
   your wp_forum_topics database. I dont know why this happens. Can you check the
   current “asgarosforum_db_version” value in your wp_options database?
 *  Thread Starter [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10002723)
 * Hi [@asgaros](https://wordpress.org/support/users/asgaros/)
 * Thanks for getting back to me so promptly. I’ve deleted the wp_forum_topics table
   now.
 * For the second problem, the asgarosforum_db_version is 19.
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10010967)
 * Not sure why the indexes are created over and over again. Maybe something went
   wrong during an update once (because the version seems to be up2date now). You
   can try to delete existing duplicate-indexes for name in the wp_forum_topics 
   table.
 *  Thread Starter [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10015038)
 * Thanks, i’ve tried that but they just get created again. I also tried changing
   the asgarosforum_db_version to 20 but that didn’t make a difference
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10016517)
 * This logic should not even get executed when the value is 20. So it seems that
   the version could not get retrieved correctly. Are you using the plugin on a 
   multisite-installation?
 *  Thread Starter [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10021497)
 * No, the plugin is being used on a single site only
 *  Thread Starter [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10022717)
 * I saw there was an update to the plugin which i installed. Now asgarosforum_db_version
   says its version 18, if i try and manually change it in the database to 20 it
   gets updated straight away back to 18. However, i’ve commented the line
 *  `$this->db->query('ALTER TABLE '.$this->tables->topics.' ADD FULLTEXT (name);');`
 * which has worked this time and it is now not creating lots of indexes so fixed
   at least temporarily.
    -  This reply was modified 8 years, 3 months ago by [okappy](https://wordpress.org/support/users/okappy/).
 *  Plugin Author [Asgaros](https://wordpress.org/support/users/asgaros/)
 * (@asgaros)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10024422)
 * Can you check if you are using the latest file? It should not be possible that
   it is set back to 18 (there is not even a logic for this in the code). Please
   check the file includes/forum-database.php. Is the version-number at the beginning
   equal 20?
 *  Thread Starter [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10024432)
 * Yes it has private $db_version = 20;
 *  Thread Starter [okappy](https://wordpress.org/support/users/okappy/)
 * (@okappy)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10024491)
 * I think i might have resolved it. We have some other servers running behind a
   load balancer. One of those servers had a version of 18 so I guess it was that
   one was conflicting with our main server. I’ve removed your plugin on that server
   for now and downloaded the latest version of your plugin on our main server, 
   everything seems to be working ok.
 * Thanks for all your help and suggestions.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘WordPress database error’ is closed to new replies.

 * ![](https://ps.w.org/asgaros-forum/assets/icon-128x128.png?rev=1546717)
 * [Asgaros Forum](https://wordpress.org/plugins/asgaros-forum/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/asgaros-forum/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/asgaros-forum/)
 * [Active Topics](https://wordpress.org/support/plugin/asgaros-forum/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/asgaros-forum/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/asgaros-forum/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 10 replies
 * 2 participants
 * Last reply from: [okappy](https://wordpress.org/support/users/okappy/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-120/#post-10024491)
 * Status: resolved