SELECT * FROM wp_postmeta WHERE meta_key = ‘wp_owner_phone’;
34 rows in set (0.00 sec)
So apparently 2 mil users – https://wordpress.org/plugins/advanced-custom-fields/ are just polluting their DB’s every time they are saving new field?
-
This reply was modified 1 year, 5 months ago by
lenotrep.
Hello @lenotrep,
I believe what you describe is not a bug, it’s a feature! 🙂
Without this behavior, the WordPress revisions won’t work. That’s why there must be keep a backup of the acf/scf field value. You should not use plain SQL to get the value, use get_field() with the post_id so the result will be limited to the current revision of the post.
If you don’t want the database pollution, maybe the solution is to limit revisions in wp-config.php ?
I always limit it to 3 revisions.
Sorry I was not aware until now about revisions! I will go searching where can be set. Thank you.
Probably define( ‘WP_POST_REVISIONS’, 5 ); in wp-config will do that
-
This reply was modified 1 year, 4 months ago by
lenotrep.