Get the Best WordPress Backup
& Migration Plugin Today
Get Duplicator Now

Duplicator Documentation

Documentation, Reference Materials, and Tutorials for Duplicator

Resolving Database-Related Build Issues

Database-related errors can occur during the build process due to various reasons, such as corrupted tables or missing database entries. This article provides solutions to common database issues encountered during the build process.

General Database Error or Warning

If you receive a general error or warning during the database build process, try the following solutions:

Option 1: Repair Database Tables

Repair the affected database tables to resolve corruption issues. For a complete guide on repairing tables, refer to this article.

Option 2: Switch Database Build Engines

By default, the database is built using MySQLDump. While this works on most hosting platforms, you may encounter issues on certain configurations. If MySQLDump causes errors, switch to PHP mode:

  1. Go to Duplicator Lite/Pro » Settings.
  2. Navigate to the Backups tab.
  3. Under SQL Mode, select PHP Code.

Missing Database Table

If the build log indicates that a table does not exist in the database, you may see errors such as:

Common Error Messages

  • Runtime error in database dump
  • QUERY ERROR: Table ‘databasename.wp_sometable’ doesn’t exist in engine

Option 1: Repair Database Tables

Repair the missing or corrupted tables to restore database integrity. For detailed steps, refer to this article.

Option 2: Enable a Table Filter

If the issue is caused by a plugin, consider filtering out the problematic plugin’s database tables and directory before building the backup:

  1. Identify the affected plugin.
  2. Filter out the plugin’s database tables.
  3. Exclude the plugin’s directory located at {your-website-root}/wp-content/plugins/plugin_name/.
  4. Reinstall the plugin on the destination system.

If reinstalling the plugin is not an option, contact the plugin author for guidance on repairing or reinitializing the missing table.

Following these steps should help resolve most database-related build issues.

Database Validation Failures for Count Checks

Databases with tables that frequently change, such as those continuously log data, can cause database validation failures during backup creation. This is due to the constant changes in these tables while a backup is being generated. Duplicator ensures that the backup is not corrupted by validating the number of database tables and columns.

To address this issue, we have introduced the constant DUPLICATOR_TABLE_VALIDATION_FILTER_LIST. By adding this constant to your wp-config.php file, you can specify which tables Duplicator should exclude from validation. This helps avoid validation errors that can disrupt backup creation. However, use this constant carefully; excluding unnecessary tables could result in broken backups without notification from the plugin.

Example Error:

DB VALIDATION FAIL: count check table “wp_postmeta” START: XXXXXX END: YYYYYY DELTA: 2 COUNT: ZZZZZZ
SQL FILE SIZE CHECK OK, SIZE: XXXXXXXX
DB VALIDATION 1: failed to validate
Runtime error in database dump Message: DB VALIDATION 1: failed to validate

Solution:

To resolve this issue, add the following line to your wp-config.php file:

define(‘DUPLICATOR_TABLE_VALIDATION_FILTER_LIST’, [‘wp_postmeta’]);

Was this article helpful?

Related Articles