WooCommerce is undoubtedly a very famous plugin, to sell products from your WordPress e-stores. It supports the selling of physical, as well as downloadable or virtual products. Recently, while trying to set up a store with WooCommerce to sell digital products, for a client project, we found that the download links for products were not generated, even after the payment was successful.


WooCommerce Order Email Without Download Link


The Ideal Scenario

Generally what should happen is, if a customer comes to your site, selects a downloadable product, and purchases it, the email that goes to the client from WooCommerce, should contain the link to download the purchased product. Not only this, after being redirected to your site upon making successful payment, the download link should be shown to user on the website, so that the user can directly download the product.


Download Link in Order Email

But in our case, none of this was happening. The download link was neither present in the email, nor available on the site.

While debugging the issue, we found out the cause. The WooCommerce table which stores user downloading permissions, ‘woocommerce_downloadable_product_permissions’, was not created. The download links, shown to the user, are generated using this table.


Tables in WooCommerce


We would like to specify here, that the solution provided by this article, has been tested only for a Single site WordPress installation and not for WordPress Multisite (WPMU/WPMS) installations. Most Importantly make sure you BACKUP your entire DATABASE, before performing the following database related operations. Hence you can always revert to it in case anything is messed up.

A Note About WordPress Database Table Name Prefix

As a good practice, all plugins when creating their own database tables, use the WordPress database prefix, specified in the wp-config.php. Following the same rule, WooCommerce also generates all tables with the mentioned prefix. Hence, if database prefix mentioned in wp-config.php is ‘wp_’, then the table created by WooCommerce will be named, wp_woocommerce_downloadable_product_permissions.

To find out your database prefix, open up wp-config.php file present in the root directory of WordPress and search for the line ‘$table_prefix = ‘. Value assigned to the variable table_prefix is your database prefix.

How did the Prefix Affect Our Use Case?

Coming back to the topic, WooCommerce or any other plugin which generates own tables will fail to create tables if the length of table names exceeds 64, because 64 is the maximum length for table names as specified by MySQL.


MySQL Schema for Object Names

In our case, database prefix set by the client, itself was greater than 20 characters! Hence, the entire table name exceeded 64 characters and WooCommerce table woocommerce_downloadable_product_permissions was not created. We knew we had to change the database prefix to something else. Definitely something much less than 20 characters.


Changing the Database Prefix

Important: Database prefix should not be changed by directly editing wp-config.php. Doing so, may break the site.

The article, on changing database prefix, explains a reliable way to change the database prefix manually, in the section ‘Changing default table prefix after Installing WordPress’. Alternatively, you could use a plugin, like Change DB Prefix to achieve the same results.

After changing the database prefix, deactivate the WooCommerce plugin and activate it again, to ensure that the tables are created. This solved our issue, and should solve your problems too. Do you have a better method to solve this issue or is your problem still not solved? If yes, feel free to let us all know about it by commenting below.


  1. gravatar

    Edith :

    Hey, thanks a lot for this solution. I had the same problem.
    Fixed it like you recommend and it worked well.
    Bye, EditH

    Reply 1
    • gravatar

      Sumit Pore :

      Hey EditH,
      Thank you for your comment.

  2. gravatar

    Keely :

    I checked, and the client has the table woocommerce_downloadable_product_permissions but the product/s don’t display on the order received page.

    Any ideas?

    Thanks Sumit

    Reply 1
    • gravatar

      Sumit Pore :

      Hi Keely,

      Could you confirm if an entry is made in the table when an order has been placed?

  3. gravatar

    esmail ebrahimi :

    thanks guy
    table “woocommerce_downloadable_product_permissions” exist but i haven’t download link in account page and haven’t product’s details email .
    do you have another way ?

  4. gravatar

    Mark :

    Similar issue. Table exists, entry exists, download link in email exists BUT no download link on order page on website. Any ideas? Thanks.

    Reply 1
    • gravatar

      Sumit Pore :

      Hi Mark,

      I don’t have a clue. I’ve never come across this issue.

  5. gravatar

    Erik Eliasson :

    This worked for me. I am extremely thankful and I wish you, Sumit, a long and prosperous life :-)
    A ridiculously long table name + a ridiculously long DB-prefix… a real unnecessary problem…
    So thanks, I could never have worked this out myself.


Notify me of follow-up comments via e-mail.