Title: Database Table Missing After Installing Version 8.2
Last modified: August 22, 2016

---

# Database Table Missing After Installing Version 8.2

 *  Resolved [dlsilverman](https://wordpress.org/support/users/dlsilverman/)
 * (@dlsilverman)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/)
 * After updating to version 8.2 I am now receiving this message several times a
   minute:
    WordPress database error Table ‘wp_statistics_historical’ doesn’t exist
   for query SELECT value FROM wp_statistics_historical WHERE type=’visitors’ made
   by wp_dashboard, do_meta_boxes, call_user_func, wp_statistics_dashboard_widget,
   wp_statistics_visitor, WP_Statistics->Get_Historical_Data
 * [https://wordpress.org/plugins/wp-statistics/](https://wordpress.org/plugins/wp-statistics/)

Viewing 15 replies - 16 through 30 (of 31 total)

[←](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/?output_format=md)
[1](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/?output_format=md)
2 [3](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/3/?output_format=md)

 *  [omidhadi](https://wordpress.org/support/users/omidhadi/)
 * (@omidhadi)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464909)
 * please fix error , at next update ;this error occurred for very websites
 *  [vandman](https://wordpress.org/support/users/vandman/)
 * (@vandman)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464912)
 * I think the “best practice” is to avoid sql keyword in each field of the database.
   Like that, there is no confusion.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464922)
 * It looks like it may be a combination of the syntax and version of MySQL as it
   has run fine on many sites I’ve tested it on.
 * Unfortunately the WordPress database setup code has some limits with using the
   backticks so I’ll have to see what I can do in the next release.
 *  [fid](https://wordpress.org/support/users/fid/)
 * (@fid)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464932)
 * I got the same problem in my error logs. DB table missing. Any quick fixes?
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464936)
 * FiD: use the table definition in post #11 and phpMyAdmin to manually create the
   table.
 *  [pirooz](https://wordpress.org/support/users/pirooz/)
 * (@pirooz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464937)
 * Nor the post #11 nor any other post could help me!
    I created the table manually.
   But also there is an error message when I add Statistics widget:
 * PHP Warning:
    include(…\httpdocs\wp-content\plugins\wp-statistics/includes/settings/
   widget.php): failed to open stream: No such file or directory in …\httpdocs\wp-
   content\plugins\wp-statistics\widget.php on line 225 PHP Warning: include(…\httpdocs\
   wp-content\plugins\wp-statistics/includes/settings/widget.php): failed to open
   stream: No such file or directory in …\httpdocs\wp-content\plugins\wp-statistics\
   widget.php on line 225 PHP Warning: include(): Failed opening ‘…\httpdocs\wp-
   content\plugins\wp-statistics/includes/settings/widget.php’ for inclusion (include_path
   =’.;.\includes;.\pear’) in …\httpdocs\wp-content\plugins\wp-statistics\widget.
   php on line 225.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464942)
 * pirooz: that would be a bug, you can delete line 225 from the wp-statistics\widget.
   php.
 *  [Sandeep Sidhu](https://wordpress.org/support/users/sandeepsidhu/)
 * (@sandeepsidhu)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464949)
 * My WP Statistics stopped working after the update. Run following SQL and it’s
   all working now.
 * CREATE TABLE wp_statistics_historical (
    `key` bigint(20) NOT NULL, `type` varchar(
   25) NOT NULL, id bigint(20) NOT NULL, uri varchar(255) NOT NULL, value bigint(
   20) NOT NULL, PRIMARY KEY (ID), KEY type (type), UNIQUE KEY id (id), UNIQUE KEY
   uri (uri) )
 *  [fid](https://wordpress.org/support/users/fid/)
 * (@fid)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464950)
 * I got this error after running that command.
 * > You have an error in your SQL syntax; check the manual that corresponds to 
   > your MySQL server version for the right syntax to use near ‘bigint(20) NOT 
   > NULL, type varchar(25) NOT NULL, id bigint(20) NOT NULL, ‘ at line 2
 *  Thread Starter [dlsilverman](https://wordpress.org/support/users/dlsilverman/)
 * (@dlsilverman)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464951)
 * Thank you. My problem had to do with using the keyword “key” as a column name,
   not enclosed in back-ticks.
 *  [fid](https://wordpress.org/support/users/fid/)
 * (@fid)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464952)
 * Problem solved!
 * put key in back ticks like david said.
 *  [Sandeep Sidhu](https://wordpress.org/support/users/sandeepsidhu/)
 * (@sandeepsidhu)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464953)
 * yeah just noticed that comment here removed the back ticks..
    Glad that you could
   get it sorted.
 * Anybody else coming to this thread, please put back ticks around “key” and “type”
   in below query, then it should work.
 * CREATE TABLE wp_statistics_historical (
    key bigint(20) NOT NULL, type varchar(
   25) NOT NULL, id bigint(20) NOT NULL, uri varchar(255) NOT NULL, value bigint(
   20) NOT NULL, PRIMARY KEY (ID), KEY type (type), UNIQUE KEY id (id), UNIQUE KEY
   uri (uri) )
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464973)
 * The next release of WP Statistics will resolve this issue, it should be out shortly.
 *  [omidhadi](https://wordpress.org/support/users/omidhadi/)
 * (@omidhadi)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464997)
 * Error not resolved for me after update 8.3 ! but historical table has been create
   in database.I’m confused!!!
 *  [omidhadi](https://wordpress.org/support/users/omidhadi/)
 * (@omidhadi)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/2/#post-5464998)
 * after remove all old database (visit and visitor ) has been worked!but my data
   removed.

Viewing 15 replies - 16 through 30 (of 31 total)

[←](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/?output_format=md)
[1](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/?output_format=md)
2 [3](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/3/?output_format=md)

The topic ‘Database Table Missing After Installing Version 8.2’ is closed to new
replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

## Tags

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

 * 31 replies
 * 9 participants
 * Last reply from: [y060121](https://wordpress.org/support/users/y060121/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/database-table-missing-after-installing-version-82/page/3/#post-5465093)
 * Status: resolved