Closed sergiubacioiu closed 2 years ago
Have not tried it - but perhaps the approches documented here will work for you. https://kinsta.com/knowledgebase/wordpress-revisions/
Already tried cleaner plugins before posting.
It is important to have the ability to delete revisions. Not only for embarassing reasons but for avoiding errors (red alert box). I have problems with german umlauts (text fields in shortcodes). If I could delete revisions in backend maybe (did not try it in database because of less time at the moment) it would disappear. In my testinstallation (staging) I tried to use a plugin. But the usability of this plugin is so bad because default setting is to delete published posts. I think it should not be necessary to install plugins in order to delete revisions of oxygen - and getting horrible results - like deleting all oxygen templates by accident. Fortunately it was only the staging. But ...
Do they not work like post revisions? You can simply set post revision to be kept to no more than X amount in the WP config file.
define('WP_POST_REVISIONS', 3);
Oxygen should have something like 'WP_POST_REVISIONS' that can be set to false for example. as of oxygen 3.2 this does not work and currently I have to go into the database and manually delete all post meta related to oxygen revisions.
Does anyone know where and what the revisions show as in the database?
So I just searched the database and it looks like the post_meta_key is ct_builder_shortcodes_revisions. I wonder if manually deleting them will break anything. There's also got to be a way for a plugin to automatically scan the database for ct_builder_shortcodes_revisions and delete them. I'm not smart enough to write one but maybe someone else is.
+1 to this request. I think it's better for many purpose to be able to delete revisions when we want, for example lightweight of the website/database because when you have 20revisions of 20pages and 200 posts, do the math hehe
Hope to see this soon
+1 to this.
I'm seeing CSS from revisions in the universal.css from an element that is only present in the revision history for a post. I want to remove the revisions to see if the unused CSS goes away, but I don't have any easy way to do this.
@chris-castillo-dev I wouldn't consider it an easy way, but you can go into the database (I use phpmyadmin) and delete the rows in the postmeta table with the meta_key ct_builder_shortcodes_revisions and ct_builder_shortcodes_revisions_dates. If you only wanted to delete revisions for specific posts/pages, you can filter by post ID and delete them.
+1 2021
+1 My Clients had 38 revisions and it's consumed 1 GB of rams on a single page. This feature should be on the next update!
+1 Having this issue quite often. Presumably the cause of the builder beginning to operate extremely slowly. Since Clients get the website last, they are the ones normally left with this now extremely slow UI. It has been a sore spot. Plugins that clear post revisions do not alter the Oxygen builder revisions.
In the meantime I ran this SQL statement through PHPMYADMIN:
SELECT *
FROM wp_postmeta
WHERE post_id = '108' AND meta_key LIKE 'ct_builder_shortcodes_revisions%'
I used Select to confirm the returned results. You should use the Post ID of your post, or, just remove that part of the 'where' statement if you want every revision deleted.
With confirmed results, I used this to drop the revisions:
DROP FROM wp_postmeta
WHERE post_id = '108' AND meta_key LIKE 'ct_builder_shortcodes_revisions%'
Afterwards, the page is much more zippy.
Please bring this to 4.0 beta ; )
Big plus 1 for this, it's starting to fill up my postmeta tables and seems like it should definitely be something we can easily clean up / sweep without having to run queries in phpmyadmin - even if it had the ability to be detected and cleaned via something like WP Optimize with other post revisions, or we could put a limit on them so there are only ever X amount stored.
thanks
First of all, WP revision mechanism is overwritten by oxygen plugin. Oxygen has its own way to keep revisions and has its own retention policy. The easiest way is to change value in variable $max_recent_revisions = 20; in oxygen revisions.php file a) to 0 for disabling and clean all revisions. b) to the lower number if you want just change total amount of revisions. Here is path to oxygen configuration file: .../wp-content/plugins/oxygen/component-framework/includes/revisions.php All revisions are erased after saving your template or page. Just to give you an example. In my case it saved me more then 30MG in postmeta table after table optimization.
It would be great to have a simple filter associated with $max_recent_revisions
.
It will prevent to hack the code source of the plugin and would work on updates.
+1
+1
We've added better controls for revisions, including the ability to delete them, in Oxygen 4.0.3 which is currently out as a release candidate.
I would like to be able to delete the builder revisions.
What are the use cases for this feature? Getting rid of the revisions before we deliver the final product to the client.