Downloads Working Again!

I changed servers last week, to a WAY better server. However, there were a few bumps along the way, in particular for the way downloadable files were handled. The problem is fixed, and downloads are now working again, thankfully, so those of you that had issues, they should be resolved. A special thank you to those that let me know about the problem.

A technical note, for those interested

People trying to download files received the following message accompanied with a fail to connect to the server and download the files.

“Unable to insert download log entry in database”

It turns out, that when I changed servers, the new server gave a new prefix to the “wc_download_log.” So download requests could not find this table in the database. The fix was surprisingly easy, but difficult to find, so I am sharing this post in the hopes that it helps. Your experience may differ, so make sure you have a backup.

  1. Do the following AFTER you have backed up your site. This is important in case you accidentally make a mistake.
  2. Go to your database and find the table that includes “wc_download_log” it will most likely have a prefix.
  3. Drop this table. Make sure to ONLY drop this table.
  4. Go to your Plugins. Deactivate WooCommerce, and then, Reactivate. WooCommerce will create the appropriate references internally.
  5. This should fix it.