Hi,
I n our website we have more than 150 custom fields per post.
But we noticed that some custom fields stored in options table long time back.
Now all post metas are in wp_postmeta table.
Is there any way to we can remove all those from the options table without affecting the old posts.
Please advice.
As far as I know, ACF has always stored fields associated with posts in the postmeta table. ACF stores fields for options pages and taxonomy terms in the options table and these cannot be moved.
Yes right.. but i am seeing some backdated entries on our options table which are custom fields.
may be some previous version of ACF stored this. isn’t it?
O can sse the defination of get_field() function where its trying to get the data from postmeta else usermeta else from options..
Line 114:
https://github.com/elliotcondon/acf/blob/master/core/api.php
Well.. i tried to find this out..
We actually used this plugin (https://wordpress.org/support/plugin/advanced-custom-fields-migrator) long time back.
But i want rid of such huge data stored in option table for custom fields.
Any suggestions?
Other than searching using phpMyAdmin or some other type of DB tool, I’m not sure there is any easy way to remove the data that the other plugin added. If there is some type of pattern to the ACF fields that it put into the options tables you might be able to get them all with the right delete query. I’d definitely back up my database before trying.