Clean WooCommerce Transient Entries

More tags

Clean WooCommerce Transient Entries
By default WooCommerce adds thousands of _transient_ entries into the WP_OPTIONS table. This tells you how to prevent it and clean it up.
Author: Jason Price: Free Type:

By default WooCommerce adds thousands of _transient_ entries into the WP_OPTIONS table. They will clog up your database and will inevitably slow down your Web site with all the consequences thereof. Actually, WooCommerce should use a geoip table to keep track of this mostly unwanted nonsense instead of clogging up the wp_options table, and include a Clear Transients function (version 2.5+ has this feature added under WooCommerce > Settings > Tools!). If you let the entries build up, over time you will get penalized by search engines because of slow load times.

THE SOLUTION

STEP 1

Go to WooCommerce settings and set Default Customer Location to No location by default. That will stop this feature from happening.

STEP 2

If you have not done this as soon as you installed WooCommerce, you'll need to go to your database using f.e. phpMyAdmin, select the WP database, select the WP_OPTIONS table and select the SQL tab.

Click in textarea to select code then copy and paste Ctrl-CCtrl-V into the SQL entry box.

Please note: XX needs to be replaced with the correct table prefix!

WORDPRESS TRANSIENTS

If you want to clean up WordPress _site_transients at the same time also paste:

Click GO

Your WP_OPTIONS table is now clean again and WordPress will recreate any _transient records it requires.


Link to us! =:)