Title: Plugin activation generates WP database errors if table prefix is not &#8220;wp_&#8221;
Last modified: October 25, 2024

---

# Plugin activation generates WP database errors if table prefix is not “wp_”

 *  Resolved [Ivan Stefanov](https://wordpress.org/support/users/iv3rson76/)
 * (@iv3rson76)
 * SiteGround Representative
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-activation-generates-wp-database-errors-if-table-prefix-is-not-wp_/)
 * Hi,
 * I am experiencing an issue with the uncanny-automator plugin version 6.0. After
   installing and activating the plugin using WP-CLI, I receive multiple WordPress
   database errors in the php_errorlog . This issue occurs on a fresh WP install
   when the WordPress table prefix is set different to “wp_” (for example $table_prefix
   = ‘ovm_’; ).
 * Here is the command I used to activate the plugin:
 *     ```wp-block-code
       $ wp plugin activate uncanny-automator
       Plugin 'uncanny-automator' activated.
       Success: Activated 1 of 1 plugins.
       ```
   
 * However, this results in numerous errors of the following type in the `php_errorlog`:
 *     ```wp-block-code
       [25-Oct-2024 07:36:47 UTC] WordPress database error Table 'db9df9wbodib9i.ovm_uap_options' doesn't exist for query SELECT option_value FROM ovm_uap_options WHERE option_name = 'automator_settings_debug_notices_enabled' LIMIT 1 made by include('/usr/local/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Plugin_Command->activate, activate_plugin, plugin_sandbox_scrape, include_once('/plugins/uncanny-automator/uncanny-automator.php'), require('/plugins/uncanny-automator/src/globals.php'), automator_get_option[25-Oct-2024 07:36:47 UTC] WordPress database error Table 'db9df9wbodib9i.ovm_uap_options' doesn't exist for query SELECT option_value FROM ovm_uap_options WHERE option_name = 'load_automator' LIMIT 1 made by include('/usr/local/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Plugin_Command->activate, activate_plugin, plugin_sandbox_scrape, include_once('/plugins/uncanny-automator/uncanny-automator.php'), require('/plugins/uncanny-automator/src/globals.php'), automator_get_option...
       ```
   
 * (The full error log contains multiple entries similar to the one above, all referencing
   the `ovm_uap_options` table, which doesn’t exist.)
 * Upon investigation, I found that this issue seems to affect every WordPress installation
   that doesn’t use “wp_” as the table prefix. The plugin appears to be hardcoded
   to expect this default prefix, which causes issues when a different prefix is
   used.
 * For reference, I looked into [this file](https://plugins.trac.wordpress.org/browser/uncanny-automator/trunk/src/core/services/rest/endpoint/log-endpoint/queries/view-queries/trigger.php?rev=2916943),
   and it seems the problem is consistent across non-default table prefixes.
 * Could the developers please look into this issue? It would be great if the plugin
   could handle custom table prefixes correctly.
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Uncanny Automator](https://wordpress.org/support/users/uncannyautomator/)
 * (@uncannyautomator)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-activation-generates-wp-database-errors-if-table-prefix-is-not-wp_/#post-18095834)
 * Hi Ivan,
 * Thank you for providing such a detailed message. It seems there are two separate
   issues, so I’ll address them individually below.
 * **Issue 1: `uap_options` Table Notices**
 * The `uap_options` table should be generated automatically, and any related notices
   should resolve on their own. However, if they persist, I’ve included additional
   steps below to help address the issue.
 * **Issue 2: Hardcoded `wp_` Prefix**
 * We did find a hardcoded `wp_` prefix in one of the plugin files, but interestingly,
   that file hasn’t been modified for months. It’s a bit unusual that this issue
   surfaced now, given it hasn’t been reported before. To help us investigate further,
   could you please provide the **System Status Report**? You can find it by navigating
   to **Automator -> Status**.
 * Since the report may contain sensitive information, feel free to send it to us
   privately at **support@automatorplugin.com**.
 * **Fixes Included**
 * To address these issues, I’ve included two updated files in this ZIP archive:
   [Download the ZIP](https://we.tl/t-nVGJUkGOAu).
 * Please follow these steps to replace the files:
    1. **global.php**:
       Replace the existing file at:`wp-content/plugins/uncanny-automator/
       src/globals.php`
    2. **trigger.php**:
       Replace the existing file at:`wp-content/plugins/uncanny-automator/
       src/core/services/rest/endpoint/log-endpoint/queries/view-queries/trigger.php`
 * After replacing the files, please check if the issues are resolved and let us
   know.
 * If you encounter any further problems or need additional help, we’re here to 
   assist you.
 * -S

Viewing 1 replies (of 1 total)

The topic ‘Plugin activation generates WP database errors if table prefix is not“
wp_”’ is closed to new replies.

 * ![](https://ps.w.org/uncanny-automator/assets/icon.svg?rev=2769432)
 * [Uncanny Automator - Easy Automation, Integration, Webhooks & Workflow Builder Plugin](https://wordpress.org/plugins/uncanny-automator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/uncanny-automator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/uncanny-automator/)
 * [Active Topics](https://wordpress.org/support/plugin/uncanny-automator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/uncanny-automator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/uncanny-automator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Uncanny Automator](https://wordpress.org/support/users/uncannyautomator/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/plugin-activation-generates-wp-database-errors-if-table-prefix-is-not-wp_/#post-18095834)
 * Status: resolved