Title: Fatal error missing column priority
Last modified: August 1, 2023

---

# Fatal error missing column priority

 *  Resolved [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/)
 * Hi there,
 * I got this fatal error after upgraded to 7.9, the following log is from apache
   error log:
 * WordPress database error Unknown column ‘priority’ in ‘field list’ for query \
   nINSERT INTO wp_actionscheduler_actions ( `hook`, `status`, `scheduled_date_gmt`,`
   scheduled_date_local`, `schedule`, `group_id`, `priority`, `args` )
 * PHP Fatal error: Uncaught RuntimeException: Error saving action: Unknown column‘
   priority’ in ‘field list’ in woocommerce/packages/action-scheduler/classes/data-
   stores/ActionScheduler_DBStore.php:126
 * Please help, Thank you for your assistance!

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

 *  [Tamrat A. (woo-hc)](https://wordpress.org/support/users/bisratlearn/)
 * (@bisratlearn)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16937423)
 * Hi [@travelavenger](https://wordpress.org/support/users/travelavenger/)
 * > I got this fatal error after upgraded to 7.9, the following log is from apache
   > error log:
   > WordPress database error Unknown column ‘priority’ in ‘field list’ for query\
   > nINSERT INTO wp_actionscheduler_actions ( `hook`, `status`, `scheduled_date_gmt`,`
   > scheduled_date_local`, `schedule`, `group_id`, `priority`, `args` )
   > PHP Fatal error: Uncaught RuntimeException: Error saving action: Unknown column‘
   > priority’ in ‘field list’ in woocommerce/packages/action-scheduler/classes/
   > data-stores/ActionScheduler_DBStore.php:126
 * From what I understand, you’ve run into a fatal error after upgrading to version
   7.9. Looking at the error log you’ve shared, it appears the problem is due to
   an unknown ‘priority’ column in your database. This issue can sometimes crop 
   up if the database doesn’t update correctly during an upgrade.
 * Let’s try updating your WooCommerce database, which might solve the problem. 
   Here’s how you can do it:
    1. Navigate to your WordPress dashboard.
    2. Go to `**WooCommerce → Status → Tools**`.
    3. Here, you should see an option called ‘`**Update database**`‘. Click on this.
 * ![](https://i0.wp.com/snipboard.io/YJHE2i.jpg?ssl=1)
 * Image Link: [](https://snipboard.io/YJHE2i.jpg)**[https://snipboard.io/YJHE2i.jpg](https://snipboard.io/YJHE2i.jpg)**
 * This action will start the database update process. Please be patient as it might
   take a few minutes to complete. Once done, it should hopefully fix the ‘Unknown
   column’ error you’re facing. 👉 You can read more about [**Updating the WooCommerce Database Here**](https://woocommerce.com/document/how-to-update-woocommerce/#woocommerce-data-update-notice)**.**
 * 📌 Please ensure that you have a good [**backup**](https://woocommerce.com/document/backup-wordpress-content/)
   of your [**full site and database**](https://wordpress.org/support/article/wordpress-backups/)
   in place before doing the updates, so that, should something go wrong, you are
   able to easily restore your site to a functioning state.
 * If the issue remains even after updating the database, it might be due to a conflict
   with a plugin or theme. I’d suggest deactivating all your plugins except WooCommerce
   and switching to a default WordPress theme like [**Storefront**](https://wordpress.org/themes/storefront/)
   to see if that helps.
 * Here’s a helpful guide on how to test for conflicts: 👉 [**How to Test for Plugin and Theme Conflicts**](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
 * In case none of the above steps work, could you send us a copy of your site’s
   System Status? This will give us a clearer picture of your site’s setup and help
   us pinpoint the problem. You can find it via `**WooCommerce > Status**`. Select`**
   Get system report**` and then `**Copy for support**`.
 * Additionally, could you also provide us with the **fatal error logs** (if any)
   under `**WooCommerce > Status > Logs**`.
 * Once you’ve got that, you can paste them right here in your reply, or use [](https://pastebin.com/)**
   [https://pastebin.com/](https://pastebin.com/)** to paste it there and share 
   it with us.
 * Thanks for your patience and cooperation. I’m looking forward to your response
   so we can resolve this issue for you.
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16938494)
 * Hi there,
 * Thank you for the advise, but the table schema remains the same after clicking
   the update tables. and at apache error log when I click the update table button:
 * PHP Warning: Undefined property: stdClass::$priority in …………/plugin/woocommerce/
   packages/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php on 
   line 379
 * Wondering if there is any reference I could find out the tables’ schema of version
   7.9 or a sql could add the column ‘priority’ in table ‘field list’ ?
 * Many thank for your help!
 *  Plugin Support [Shameem – a11n](https://wordpress.org/support/users/shameemreza/)
 * (@shameemreza)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16952536)
 * Hi [@travelavenger](https://wordpress.org/support/users/travelavenger/)
 * If the **WooCommerce > Status > Tools > Update Database** doesn’t work, you might
   need to reinstall WooCommerce. Please ensure you have a backup before proceeding.
   Deactivate and delete the WooCommerce plugin, then download and install it again.
   This should prompt WordPress to create any missing tables in the database.
 * Also, Sometimes, other plugins can cause conflicts. To check this, disable all
   your plugins except WooCommerce and see if the issue persists. If it doesn’t,
   reactivate your plugins one by one until you find the one causing the conflict.
   You can find a more detailed explanation of conducting a conflict test [here](https://docs.woocommerce.com/document/how-to-test-for-conflicts/).
 * Alternatively, you can install and activate the [Action Scheduler](https://wordpress.org/plugins/action-scheduler/)
   plugin. Once it’s active, go to **Tools > Scheduled Actions > Failed/Pending**.
   You should see a notice indicating that it attempted to create the tables for
   you.
 * Unfortunately, we don’t provide a specific version of the WooCommerce table schema
   because it dynamically generates based on your site’s configuration and the plugins
   you’ve installed. But don’t worry, you can still view your current table schema
   using a database management tool like phpMyAdmin.
 * I hope this helps. Please let us know if you have any other questions or need
   further assistance.
 * Thanks!
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16954709)
 * Hi there,
 * thank you for the advise. Understand that reinstall woocommerce will create any
   missing tables in the database, but in my case it is missing a “column” within
   a table, would that fix the issue as well?
 * Also, since the function **WooCommerce > Status > Tools > Update Database** doesn’t
   work in some cases, would it be fixed in the future version? Maybe add some more
   checking and included more condition in order to update the database.
 * Thank you!
 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16968172)
 * Hello [@travelavenger](https://wordpress.org/support/users/travelavenger/),
 * > thank you for the advise. Understand that reinstall woocommerce will create
   > any missing tables in the database, but in my case it is missing a “column”
   > within a table, would that fix the issue as well?
 * Thank you for trying our previous suggestions! :‎)
   This is actually a known bug
   and it’s caused by a missing database column.
 * As a workaround, you can simply run this WP-CLI command to rebuild the database
   tables: `wp action-scheduler fix-schema`
 * Please note, your hosting providers may not allow access to the WP-CLI so you
   might need to get in touch with them first
 * Let us know if you have any other questions.
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16968471)
 * Hi there,
 * Thank you for the solution, I have several wordpress site in the server, just
   want to confirm if I should run the command at the root folder of the wordpress
   haing the issue and it will not affect the other sites?
 * Thank you!
 *  Plugin Support [Shameem – a11n](https://wordpress.org/support/users/shameemreza/)
 * (@shameemreza)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16968514)
 * Hi [@travelavenger](https://wordpress.org/support/users/travelavenger/)
 * Yes, you are correct. To apply the solution, you should run this command in the
   root folder of the WordPress site that is having the issue.
 * Additionally, ensure you gave the database user full admin permission before 
   running this command.
 * Do let us know how it goes. Thanks!
 *  [ghousec](https://wordpress.org/support/users/ghousec/)
 * (@ghousec)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16989066)
 * In the root directory of my WordPress install
 * `wp action-scheduler fix-schema --allow-root`
 * This solution worked fine for me, I just needed to enable the database user with**
   Global privileges **via PhpMyAdmin for the table rebuild to complete.
 * Thanks for the solution 🙂
 *  [waseemabs](https://wordpress.org/support/users/waseemabs/)
 * (@waseemabs)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16990228)
 * **Fatal error**: Uncaught RuntimeException: Error saving action: Error saving
   action: Unknown column ‘priority’ in ‘field list’ in /home/**SITENAME**/public_html/
   wp-content/plugins/woocommerce/packages/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.
   php:44 Stack trace: #0 /home/**SITENAME**/public_html/wp-content/plugins/woocommerce/
   packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php(
   242): ActionScheduler_DBStoreMigrator->save_action() #1 /home/SITENAME/public_html/
   wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.
   php(327): ActionScheduler_HybridStore->save_action() #2 /home/SITENAME/public_html/
   wp-content/plugins/woocommerce/packages/action-scheduler/classes/ActionScheduler_ActionFactory.
   php(315): ActionScheduler_ActionFactory->store() #3 /home/SITENAME/public_html/
   wp-content/plugins/woocommerce/packages/action-scheduler/functions.php(102): 
   ActionScheduler_ActionFactory->create() #4 /home/SITENAME/public_html/wp-content/
   plugins/woocommerce/packages/action-scheduler/classes/migration/Scheduler.php(
   89): as_schedule_single_action() #5 /home/SITENAME/public_html/wp-content/plugins/
   woocommerce/packages/action-scheduler/classes/migration/Controller.php(119): 
   Action_Scheduler\Migration\Scheduler->schedule_migration() #6 /home/SITENAME/
   public_html/wp-includes/class-wp-hook.php(310): Action_Scheduler\Migration\Controller-
   >schedule_migration() #7 /home/SITENAME/public_html/wp-includes/class-wp-hook.
   php(334): WP_Hook->apply_filters() #8 /home/SITENAME/public_html/wp-includes/
   plugin.php(517): WP_Hook->do_action() #9 /home/SITENAME/public_html/wp-settings.
   php(654): do_action() #10 /home/SITENAME/public_html/wp-config.php(116): require_once(‘…’)#
   11 /home/SITENAME/public_html/wp-load.php(50): require_once(‘…’) #12 /home/SITENAME/
   public_html/wp-admin/admin.php(34): require_once(‘…’) #13 /home/SITENAME/public_html/
   wp-admin/network/admin.php(13): require_once(‘…’) #14 /home/SITENAME/public_html/
   wp-admin/network/plugins.php(11): require_once(‘…’) #15 {main} thrown in **/home/
   SITENAME/public_html/wp-content/plugins/woocommerce/packages/action-scheduler/
   classes/migration/ActionScheduler_DBStoreMigrator.php** on line **44**
 *  [waseemabs](https://wordpress.org/support/users/waseemabs/)
 * (@waseemabs)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-16990233)
 * I also face this problem from yesterday, but does not yet solved.
 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-17003307)
 * Hello [@waseemabs](https://wordpress.org/support/users/waseemabs/),
   I’m sorry
   to know you’re still experiencing this issue. The team is already aware of it
   but we don’t have an estimate on when a fix will be released. You can run the
   following WP-CLI command as a workaround: `wp action-scheduler fix-schema`If 
   you have any other questions about this, please create your own thread from [here](https://wordpress.org/support/plugin/woocommerce/).
 * Thank you!
 *  Thread Starter [travelavenger](https://wordpress.org/support/users/travelavenger/)
 * (@travelavenger)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-17018113)
 * I solved the issue by running the following sql at phpmyadmin:
 * ALTER TABLE `wp_actionscheduler_actions`
   ADD `priority` tinyint(10) unsigned 
   NOT NULL;
 * which will create the missing column.
 * Hope this helps and hope the woocommerce team could make use of this and add 
   a fix in the future version
 *  [Saif](https://wordpress.org/support/users/babylon1999/)
 * (@babylon1999)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-17027622)
 * Thank you for sharing your solution with the community, [@travelavenger](https://wordpress.org/support/users/travelavenger/)!
   
   I’m sure merchants who don’t have access to the WP-CLI will appreciate it. :‎)
   Since the cause of the issue is now clear, I’ll go ahead and mark the thread 
   as solved. Feel free to create a new one if you have any other questions. Cheers!
 *  [sujaysreedhar](https://wordpress.org/support/users/sujaysreedhar/)
 * (@sujaysreedhar)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/#post-17125896)
 * I was facing the same issue, [@travelavenger](https://wordpress.org/support/users/travelavenger/)
   with some modifications seems to work
 *     ```wp-block-code
       ALTER TABLE wp_actionscheduler_actions ADD priority tinyint(10) unsigned NOT NULL AFTER extended_args;
       ```
   
 *  Plugin Support [Shameem – a11n](https://wordpress.org/support/users/shameemreza/)
 * (@shameemreza)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/page/2/#post-17141868)
 * Hello [@sujaysreedhar](https://wordpress.org/support/users/sujaysreedhar/)
 * I’m glad you were able to find a solution to your inquiry here, and thanks for
   sharing it with the community too! 💥💥
 * Should you have further inquiries, kindly [create a new topic here](https://wordpress.org/support/plugin/woocommerce/#new-topic-0).
 * Thanks!

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

The topic ‘Fatal error missing column priority’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [woocommerce update](https://wordpress.org/support/topic-tag/woocommerce-update/)

 * 16 replies
 * 7 participants
 * Last reply from: [Shameem – a11n](https://wordpress.org/support/users/shameemreza/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/fatal-error-missing-column-priority/page/2/#post-17141868)
 * Status: resolved