Robert Granlund
asked on
WordPress Database and cleaning out old data
WordPress / WooCommerce Database is huge. I'm helping with a store that over the years the database tables have become huge. Literally millions of table entries. Is there any way to get rid of data that is no longer needed in the postmeta table? Is there old information that no longer needs to be stored?
I was told I can use the following in MyPHPadmin:
But if I do that, will I loos anything from my WooCommerce Store?
I was told I can use the following in MyPHPadmin:
SELECT * FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
DELETE pm FROM wp_postmeta pm LEFT JOIN wp_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
But if I do that, will I loos anything from my WooCommerce Store?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I wouldn't worry about the woocommerce database but for the Wordpress database there are several optimizations https://www.shoutmeloud.com/reduce-wordpress-database-size.html