Title: WordPress database error Table doesn&#039;t exist.
Last modified: August 22, 2016

---

# WordPress database error Table doesn't exist.

 *  Resolved [larnellc](https://wordpress.org/support/users/larnellc/)
 * (@larnellc)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/)
 * I get an error when trying to precache my site.
 * WordPress database error Table ‘abc_websites.abc__blogs’ doesn’t exist for query
   SELECT * FROM abc__blogs ORDER BY blog_id made by do_action_ref_array, call_user_func_array,
   WP_FFPC->precache_coldrun.
 * I have network that uses a domain mapping plugin to map subsites.
    Could this
   also be the reason I’ve never seen a precache log? I have never had the option
   to specify one. I logged into mysql and verified the table and data does exist.
 * In mysql the data is organized like so:
 * > SQL query: SELECT * FROM `abc_blogs` LIMIT 0, 30 ;
   >  Blog_id site_id domain 
   > path public 1 1 apples.org / 0 2 1 apples.org /varieties/ 0 3 1 apples.org /
   > recipes/ 1
 * Ideas?
 * [https://wordpress.org/plugins/wp-ffpc/](https://wordpress.org/plugins/wp-ffpc/)

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

 *  [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681654)
 * Hi Peter,
 * I’m having the same exact error as described above, though on a multisite dev
   server with only one site currently registered (more to come once the environment
   is fully configured). As with larnellc, I also checked and can verify that account.
   db_db.blogs does exist, but also noticed that the error log shows a double__underscore
   between the db and table name, versus a single_underscore as shown in phpMyAdmin…
 * phpMyAdmin datatable prefix & name (example): db_blogs
 * error log datatable prefix & name (example): db__blogs
 * I’d assume that custom database and datatable prefixes are supported, correct?
 * Not sure if this is directly related to WP-FFPC, only that it appears to not 
   be isolated to just one user, and as a result is preventing the precache from
   executing. Any thoughts on what might be throwing the error or suggestions on
   what mods we can try to force the precache build since we know that the _blogs
   table exists?
 * Thanks in a advance!
 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681659)
 * Hi,
 * (previous comment deleted, because I do have an sql query)
    I’ll look into this.
 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681660)
 * Could you please change:
    the line
 * `$pfix = empty ( $wpdb->base_prefix ) ? 'wp' : $wpdb->base_prefix;`
    to `$pfix
   = empty ( $wpdb->base_prefix ) ? 'wp_' : $wpdb->base_prefix;`
 * on
    [https://github.com/petermolnar/wp-ffpc/blob/1.7.7/wp-ffpc-class.php#L1145](https://github.com/petermolnar/wp-ffpc/blob/1.7.7/wp-ffpc-class.php#L1145)
 * and
    `$blog_list = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM ". $pfix."
   _blogs ORDER BY blog_id", '' ) );` to `$blog_list = $wpdb->get_results( $wpdb-
   >prepare( "SELECT * FROM ". $pfix ."blogs ORDER BY blog_id", '' ) );` on [https://github.com/petermolnar/wp-ffpc/blob/1.7.7/wp-ffpc-class.php#L1146](https://github.com/petermolnar/wp-ffpc/blob/1.7.7/wp-ffpc-class.php#L1146)
 * please?
    I believe that is the issue.
 *  [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681663)
 * I gave it a shot, but unfortunately no dice…
 * `Fatal error: Call to undefined method WP_FFPC::_site_url() in /home/server/public_html/
   wp-content/plugins/wp-ffpc/wp-ffpc-class.php on line 1180`
 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681664)
 * I meant to do it on your installed version; that version on github is a bit messy
   I was only using it as a reference.
 *  [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681665)
 * I understood your instructions, Peter; loaded wp-ffpc-class.php into Notepad+
   + from a fresh download of v1.7.7 directly from the wp-repo, modified lines 1145&
   1146 as instructed, and uploaded the revised file to the server. Went back into
   network admin, reactivated WP-FFPC, saved settings (APCu), and received the fatal
   error after clicking precache.
 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [11 years ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681690)
 * This should be sorted in 1.8.2; could you please come back to me with the results?
 *  [gotequity](https://wordpress.org/support/users/gotequity/)
 * (@gotequity)
 * [11 years ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681691)
 * Confirming that v1.8.2 resolves the fatal error issue. Tested in multisite with
   4 blogs, precache ran flawlessly, and no errors encountered when clearing/rebuilding
   cache or switching between APCu and Memcached handlers. Well done, Peter!
 *  Plugin Author [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * (@cadeyrn)
 * [11 years ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681692)
 * Thank you for the test and for the feeback!

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

The topic ‘WordPress database error Table doesn't exist.’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-ffpc_ffffff.svg)
 * [WP-FFPC](https://wordpress.org/plugins/wp-ffpc/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ffpc/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ffpc/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ffpc/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ffpc/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ffpc/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [network](https://wordpress.org/support/topic-tag/network/)
 * [precache](https://wordpress.org/support/topic-tag/precache/)

 * 9 replies
 * 3 participants
 * Last reply from: [petermolnar](https://wordpress.org/support/users/cadeyrn/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/wordpress-database-error-table-doesnt-exist-3/#post-5681692)
 * Status: resolved