Title: DatabaseQueryException while installing latest plugin 4.2.0
Last modified: May 4, 2025

---

# DatabaseQueryException while installing latest plugin 4.2.0

 *  Resolved [Michael](https://wordpress.org/support/users/migaweb/)
 * (@migaweb)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/databasequeryexception-while-installing-latest-plugin-4-2-0/)
 * Hi,
   on my local machine during the installation process of your plugin I’m getting
   this error:
 *     ```wp-block-code
       Fatal error: Uncaught Give\Framework\Database\Exceptions\DatabaseQueryException: Database Query in wp/wp-content/plugins/give/src/Framework/Database/DB.php:247 Stack trace: #0 wp/wp-content/plugins/give/src/Framework/Database/DB.php(86): Give\Framework\Database\DB::runQueryWithErrorChecking() #1 wp/wp-content/plugins/give/src/Framework/QueryBuilder/Concerns/CRUD.php(103): Give\Framework\Database\DB::__callStatic() #2 wp/wp-content/plugins/give/src/FormBuilder/FormBuilderRouteBuilder.php(84): Give\Framework\QueryBuilder\QueryBuilder->get() #3 wp/wp-content/plugins/give/src/FormBuilder/ServiceProvider.php(57): Give\FormBuilder\FormBuilderRouteBuilder->getUrl() #4 wp/wp-includes/class-wp-hook.php(324): Give\FormBuilder\ServiceProvider::{closure:Give\FormBuilder\ServiceProvider::boot():55}() #5 wp/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #6 wp/wp-includes/plugin.php(517): WP_Hook->do_action() #7 wp/wp-admin/admin-header.php(123): do_action() #8 wp/wp-admin/plugins.php(637): require_once('...') #9 {main} thrown in wp/wp-content/plugins/give/src/Framework/Database/DB.php on line 247
       ```
   
 * I’ve added some debug to see the error and it looks like it is not creating the
   database:
 *     ```wp-block-code
       Table 'wp.wp_give_campaigns' doesn't exist
       ```
   
 * When I check my database it will only create 3 tables: give_log, give_migrations
   and give_revenue.

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

 *  Thread Starter [Michael](https://wordpress.org/support/users/migaweb/)
 * (@migaweb)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/databasequeryexception-while-installing-latest-plugin-4-2-0/#post-18450328)
 * Quick update: I was able to resolve it by commenting out `throw new DatabaseQueryException(
   $wpdb->last_query, $wpError->errors);` in DB.php so I can access the page again.
   After that I could set `remove all data` when uninstalling the plugin. Then I’ve
   uninstalled the plugin and reinstalled it again. After that I saw the installation
   wizard again and it was adding all tables.
 * So the issue seems to be when you had the plugin installed once, removed it and
   didn’t clean all existing data.
 *  Plugin Support [Ginger Coolidge](https://wordpress.org/support/users/gscoolidge/)
 * (@gscoolidge)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/databasequeryexception-while-installing-latest-plugin-4-2-0/#post-18453704)
 * Hello,
 * Thank you for getting in touch, and for sharing your testing steps!
 * Let us know if we can be of further assistance 🙂
 *  Plugin Support [Robin Joshua Del Mundo](https://wordpress.org/support/users/robindelmundo/)
 * (@robindelmundo)
 * [1 year ago](https://wordpress.org/support/topic/databasequeryexception-while-installing-latest-plugin-4-2-0/#post-18466290)
 * Hi [@migaweb](https://wordpress.org/support/users/migaweb/) ,
 * Thanks for sharing those steps! I’m marking this one as resolved.
 * Please don’t hesitate to contact us should you have other concerns.
 * Thank you for using GiveWP!
 * Have a wonderful day.

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

The topic ‘DatabaseQueryException while installing latest plugin 4.2.0’ is closed
to new replies.

 * ![](https://ps.w.org/give/assets/icon-256x256.jpg?rev=2873287)
 * [GiveWP - Donation Plugin and Fundraising Platform](https://wordpress.org/plugins/give/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/give/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/give/)
 * [Active Topics](https://wordpress.org/support/plugin/give/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/give/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/give/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Robin Joshua Del Mundo](https://wordpress.org/support/users/robindelmundo/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/databasequeryexception-while-installing-latest-plugin-4-2-0/#post-18466290)
 * Status: resolved