wp_postmeta is huge
-
Hi,
After transferring from a VPS to another I uploaded xml files from WordPress Importer plugin and restored posts, pages and others. However wp_postmeta has 1,5 million rows and it is 335 MB! The plugin named WP-optimize says “No orphaned post meta data in your database” I used these 2 codes below but nothing changed. How can I fix this without losing any information?
DELETE pm
FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULLSELECT * 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;
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wp_postmeta is huge’ is closed to new replies.