Support » Plugin: WooCommerce » Problems with 4.3.0 database after upgrade

  • Resolved sunspot10


    After updating to Woocommerce 4.3.0 on WordPress 5.4.2, I get the following error within WP Admin backend:

    WooCommerce XXXX_wc_reserved_stock table creation failed. Does the wordpress_sedm user have CREATE privileges on the sedmorg_wordpress database?


    1. PHP 7.3.19
    2. WordPress 5.4.2
    3. Kleo theme.
    4. MySQL 5.6
    5. Windows Server 201
    6. Plesk 18.0.28
    7. MySQL database user has EVERY permission possible within Plesk.
    8. Checked PHPMyadmin and table “7iRkQ1_wc_reserved_stock” already exists.

    Troubleshooting so far:
    1. Tried backtracking PHP to previous version. No change.
    2. Tried deleting XXXX_wc_reserved_stock and Woocommerce recreates it quickly.
    3. Tried manually updating Woocommerce Plugin to 4.3.0 through FTP. No change. Did this because Woocommerce plugin is large and sometimes times out because of PHP timeouts because it is over 40MB and takes 30 minutes just to upload.
    4. After all the above measures, the error persists.

    It looks like this is a Woocommerce 4.3.0 version BUG. Can you confirm this and fix it please? Any suggestions?

    • This topic was modified 1 year, 11 months ago by sunspot10.
    • This topic was modified 1 year, 11 months ago by sunspot10.
    • This topic was modified 1 year, 11 months ago by sunspot10.

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter sunspot10


    Here’s an email that the site mailed to me about the error:

    Here is an email I just got about the error:


    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, WooCommerce.

    First, visit your website ( and check for any visible issues. Next, visit the page where the error was caught ( and check for any visible issues.

    Please contact your host for assistance with investigating this issue further.

    If your site appears broken and you can’t access your dashboard normally, WordPress now has a special “recovery mode”. This lets you safely login to your dashboard and investigate further.

    To keep your site safe, this link will expire in 1 day. Don’t worry about that, though: a new link will be emailed to you if the error occurs again after it expires.

    When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 5.4.2
    Current theme: Kleo Child (version )
    Current plugin: WooCommerce (version 4.3.0)
    PHP version 7.3.19

    Error Details
    An error of type E_COMPILE_ERROR was caused in line 168 of the file C:\inetpub\vhosts\\httpdocs\wp-content\plugins\woocommerce\vendor\autoload_packages.php. Error message: require_once(): Failed opening required ‘C:\inetpub\vhosts\\httpdocs\wp-content\plugins\woocommerce\packages\woocommerce-blocks\src\BlockTypes\PriceFilter.php’ (include_path=’.;.\includes;.\pear’)”

    Plugin Author Vedanshu Jain


    Hi, WooCommerce 4.3 needs a new table wc_reserved_stock and tries to create it when plugin upgrades. The error you are encountering means that your host has not given permission to WordPress to create this table, and therefore the process for creating the table fails.

    To fix this, please reach out to your host to ask them to:

    1. Grant CREATE TABLE privilege to the WordPress db user on your database.


    2. Create the table manually using this definition (make sure to substitute {$wpdb->prefix} as per your configuration):

    CREATE TABLE {$wpdb->prefix}wc_reserved_stock (
    	order_id bigint(20) NOT NULL,
    	product_id bigint(20) NOT NULL,
    	stock_quantity double NOT NULL DEFAULT 0,
    	timestamp datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    	expires datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    	PRIMARY KEY  (order_id, product_id)

    Note that until this table is created, stock management will not work as expected.

    • This reply was modified 1 year, 11 months ago by Vedanshu Jain. Reason: formatting
    • This reply was modified 1 year, 11 months ago by Vedanshu Jain.
    Plugin Author Vedanshu Jain


    I overlooked earlier and noticed just now that you have already created the table in your original post, in this case, I would recommend staying at 4.3 version. This notice only displayed when checking for the table fails for some reason, if the table is created (as you have verified), then its harmless and safe to ignore. We will look into why it is shown in the first place though.

    You can also confirm if this table is present and detected by WC by going to /wp-admin/admin.php?page=wc-status#status-database.

    Thread Starter sunspot10



    Thanks, but:

    1. As I said, the user already has CREATE permissions. In fact, they have EVERY permission possible for a user to have.

    2. AFTER seeing the error, I checked the tables list in phpMyAdmin and it already exists.

    3. When I delete the table Woocommerce automatically restores and recreates it, but the error persists.

    4. Your post also does not explain how to deal with the compile error email from WordPress.

    Obviously, its a bug in the plugin, because the table is in fact being created automatically by Woocommerce but it still reports that it CANNOT be created.

    I went back to Woocommerce 4.2.2 until the bug is fixed. I’m going to wait for 4.3.1 or later to try again. The error went away when I did so. This is a *.0 release and bugs like this are common when testing is insufficient.

    • This reply was modified 1 year, 11 months ago by sunspot10.
    • This reply was modified 1 year, 11 months ago by sunspot10.
    • This reply was modified 1 year, 11 months ago by sunspot10.
    Plugin Support Ena P (a11n)


    Hi @sunspot10. One issue to note is that Plesk, being a Windows-based server, will create tables in lowercase. I recommend reverting the table prefix to lowercase in your wp-config.php file if you’re still facing this issue.

    Thread Starter sunspot10



    That is a helpful start on what the problem is. However:

    1. When I change the table prefix to all lower case, I can no longer login to the site as admin at /wp-admin/. It says: “Sorry, you are not allowed to access this page.”

    2. If I go back to the old wp-config.php file, I still have this problem.

    Now I’m locked out of my site!

    What next?

    Plugin Support Ena P (a11n)


    Hi @sunspot10. Here is a guide on what to do if you are locked out of your site after changing the table prefix. I hope that helps!

    Plugin Support Ena P (a11n)


    Hi @sunspot10. We haven’t heard back from you in a while, so I’m going to mark this as resolved. Please start a new thread if you have further questions.

    Thread Starter sunspot10


    1. Changing the table prefix did not help.
    2. I was able to restore the data back to what it was BEFORE changing the table prefix.
    3. The error still happens that began this thread with Woocommerce 4.4.1 and even 4.5 which just came out.
    4. Obviously, there is a problem with Woocommerce 4.4.1 and 4.5 with running on Windoes servers because of translation of table names to all lower case.
    5. Woocommerce STILL needs to be fixed to prevent this problem.

    Thread Starter sunspot10


    The problem happens on MULTIPLE sites on the same windows server (3 sites).

    Thread Starter sunspot10


    For the record, I fixed the problem with the following procedure.

    1. Backed up the site database with Updraft Plus plugin.

    2. Renamed the table prefix in the wp_config.php file to be all lower case.

    3. Did a fresh wordrpess install using the modified wp_config.php file with lower case table prefixes in it.

    4. Activated the Updraft Plus plugin inside the fresh wordpress install.

    5. Restored the database backup done previously with Updraft Plus

    6. Logged into the admin panel and looked at the top of the page for the Woocommerce error.

    The error is GONE now, because now the lower case table name prefix in MySQL matches that in the wp_config.php file.

    So you were correct about a possible mismatch in the table name prefix case in Windows Server Plesk. However, the solution was not to manually try to change the table name prefix. The better answer is to use automated backup and restore. Updraft handles the translation of table names from the backup to the site it is restored to and does it properly and completely.

    Thanks anyway.

    Plugin Support Ena P (a11n)


    Hi @sunspot10. Thanks for circling back to share what process worked for you with the community. Happy to hear that you were able to resolve the issue.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Problems with 4.3.0 database after upgrade’ is closed to new replies.