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.
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?
- Yeah, more Database table entries cause
higher
search queryload time
, which eventually slow down your site. - It’s against WordPress Speed Optimization Goal.
- 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_%'
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.