During the site development, I had to create many post types, taxonomies and ACF fields.
Before making live, I deleted most of the post types, taxonomies and ACF fields.
I feel WP-ADMIN and search became slow on the site. People recommended cleaning unused database tables and meta from the database. When I checked the postmeta table, I found that all the deleted ACF fields of the posts are still there. I can see thousands of unwanted records starting with “_” (underscore).
My questions are:
1. Is there any way to remove those meta? (I tried few plugins like Advanced DB Cleaner Premium, but no luck)
2. Does this orphan data make the backend and site search slow?
If this affects the performance of the site, then I need to manually transfer the data to a fresh WP installation. It may take days to complete!
I needed to delete a big amount of unused fields for a website we’re maintaining for years. As fields get renamed or deleted, meta fields stay unused in the database. While the size of the database gets unnecessary bigger we also had an issue in the search (since old fields were found).
I didn’t found a proper and safe solution without a heavy SQL query to remove those data. So I created a plugin using functions provided by ACF to remove unused metadata.