Quantcast
Channel: Crunchify
Viewing all articles
Browse latest Browse all 1037

WooCommerce adds thousands of _transient_ Entries into WP_OPTIONS table? How to Delete and Disable all geoip Transient Settings

$
0
0

WooCommerce - Stop GeoLocate setting and avoid adding thousands of entries to wp_options table - in my case almost 20000 entries

We have enabled WooCommerce WordPress Plugin integration on Crunchify last week. It’s been fantastic week and we are working so hard to release full featured Shopping experience on Crunchify soon.

Today I was checking all database tables as part of routine activity and suddenly noticed large number of _transient_ records in WP_OPTIONS table.

Almost ~20k entries?? Oh no.. that’s too much.

Almost 20000 Transient Entries added to wp_option table by WooCommerce

I tried digging more into it and most of those entries were divided into below 6 transient keys, all related to WooCommerce.

_transient_timeout_geoip_::1
_transient_geoip_::1
_transient_timeout_external_ip_address_::1
_transient_external_ip_address_::1
_transient_timeout_geoip_16.153.160.76
_transient_geoip_16.153.160.76

Only last two entries have unique IPs and those are dynamic based on user’s IP addresses.

By looking at this first, only thing I thought – who is adding these entries to wp_options table? Must be from some plugin.

After digging more and removing all other possibilities I finally end up checking WooCommerce plugin’s setting page and found an option related to Geo Location.

Are there any disadvantages having those many  _transient_  entries in DB?

  1. Yeah, more Database table entries cause higher search query load time, which eventually slow down your site.
  2. It’s against WordPress Speed Optimization Goal.
  3. Your site may get penalize in Google Search Result page because of page load time issue.

How to fix and cleanup _transient_ records in WordPress wp_options table?

Step-1

As you see in above image, I’ve immediately disabled Default Customer Location setting to No location by default.

Step-2

  • Go to cPanel
  • Click on phpMyAdmin
  • Click on your Site DB
  • Click on WP_OPTIONS table
  • Click on SQL Tab
  • Execute below query and it will remove all _transient_ records from table

delete from `wp_options` where `option_name` like '%_transient_%'

Delete _transient_ keys fromWordPress WP_OPTIONS table

Above operation will not break WordPress site if your delete all _transient_ records from wp_options table. WordPress will recreate all required _transient_ records again.

Now you shouldn’t see any new entries added to wp_options table related to customer GeoIP location.

The post WooCommerce adds thousands of _transient_ Entries into WP_OPTIONS table? How to Delete and Disable all geoip Transient Settings appeared first on Crunchify.
Author: App Shah


Viewing all articles
Browse latest Browse all 1037

Trending Articles