Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [revisions]

The tag has no usage guidance.

0
votes
0answers
10 views

Blank revision upon save

Sometimes when a user saves a custom post type, WordPress saves a blank revision (see below) I only have ACF installed as a third party plugin, I see no errors in my error_log that are related. I ...
5
votes
1answer
40 views

Is it possible to select against a post's parent's fields with WP_Query?

I'd like to query post revisions using WP_Query for display on an admin page, and I want to include pagination parameters. I have two constraints: I would like to only retrieve revisions for ...
0
votes
1answer
15 views

Compare first and last post revision

I would like to know if I'm the only one who wishes to compare first and last post revision or better compare and two arbitrary revisions. Even best would be being able to compare text in visual (...
0
votes
1answer
22 views

Is there a way to determine which user changed a custom field (and when)?

A custom field on posts in my Wordpress installation stores an image URL. I need to know when this custom field was updated, and by which user, for a particular post. I know this data is not stored ...
1
vote
1answer
27 views

Define a wordpress constant through plugin functions?

I'm working on a plugin and trying to build in an option to disable post revisions. I have the setting registered, and confirmed that the checkbox is linking to the database. The option value is ...
0
votes
1answer
30 views

Too many revision when post status is changes [duplicate]

When ever i update the custom post type it generates too many revision which crashed the website. ( memory exceeded) How can i debug this issue? Update : I was able to find the culprit. Will it be ...
0
votes
0answers
23 views

is there a way to see all changes been done on a wordpress site?

I was asked to overtake a website created by wordpress.org. The former IT did not do anything on the website since 2015 and I got asked to prove it. I can see the revisions but my boss wants it to be ...
1
vote
0answers
53 views

Exporting revisions

How do you export revisions for posts? I cloned a site with it's complete Wordpress DB 4 months ago. After the clone revisions have been made to the existing posts and new posts has been added to ...
0
votes
0answers
38 views

Support auto-save and revisions for custom fields

I recently read this tutorial about custom fields in WordPress and wrote a simple plug-in to provide a metabox with a set of input fields. I do not use the Meta Box plug-in promoted on the web site. ...
1
vote
1answer
204 views

Enabled Revisions to existing custom post type not working Wordpress

I am trying to enable revisions for an existing custom post type. As the post type was already created about 2 years ago so where the post type was register I added revisions to the supports array. ...
2
votes
2answers
28 views

How can we publish revisions of a post, in addition to showing the latest post?

With the latest version of WordPress, how can we publish revisions of a post, in addition to showing the latest post? I want my front end users to see multiple versions of the same post. The same ...
0
votes
0answers
154 views

“Sorry, something went wrong. The requested comparison could not be loaded.”

In testing, I reverted to a standard theme and disabled all plugins. When I go to the revisions page it loads fine. But when I then use the slider to scroll through the revisions I receive the error.....
0
votes
0answers
12 views

Delete revisions only after certain time?

I want to clear out old post revisions but only one that are older than a certain timelimit. Like 3 years. I am unable to find a plugin that supports this.
0
votes
1answer
2k views

Revisions deos not work on the new update of wordpress 2018 ( WordPress 4.9.5.) .Went to Screen Options but does not appear

iaccidentally deleted some of my content then published it. Now my layout is all messed up . but cant find the revisions option on new update ( WordPress 4.9.5.)
0
votes
1answer
327 views

How to enable the view of revisions of post in Wordpress Api for custom post type?

{ "code": "rest_cannot_read", "message": "Sorry, you are not allowed to view revisions of this post.", "data": { "status": 401 } } /wp-json/wp/v2/posts/"ID"/revisions (Im using this ...
4
votes
3answers
1k views

Do multiple revisions really slow down WordPress?

I have read numerous times that I should clean up my database to keep performance high. Keeping multiple revisions of posts is always cited as a big performance stealer. I'm suspicious of this claim....
0
votes
1answer
31 views

Enable post revisions for a specific post

I was wondering if there is a way to override a FALSE wp_post_revisions configuration, by excluding specific posts upon user action, and have the database store revisions for those only. Any ideas, ...
0
votes
0answers
36 views

How to edit posts/pages without making the change live?

We have a situation here at work I've never run into in many years of working with Wordpress. In the past, it's been acceptable to edit a post or page, click update, and make the changes live on the ...
0
votes
0answers
70 views

New post overwrites previous

I published an article, which went up fine. Then I went to publish the next article and as soon as that published, the previous article disappeared. The new one has permalink the same as previous. ...
1
vote
1answer
324 views

Post revisions disappeared (for some posts)

I have noticed today that I don't see post revisions anymore, and I don't see it for all posts, custom posts, pages... null. I've checked all possibilities that I knew: WP_POST_REVISIONS turning ...
0
votes
1answer
110 views

Clean up customize_changeset in DB

Is there something similar to define( 'WP_POST_REVISIONS', 0 ); for customize_changeset type so they're not collected in DB.
1
vote
1answer
54 views

Allow a non-author to see revisions of a post

I have a specific workflow of authoring in my website. An author publishes a new post, then an automatic version with another language is generated and assigned to another user (translator). I want ...
4
votes
1answer
538 views

Autosave control in WordPress

I've been trying to find a filter or settings in WordPress to control the Autosave behavior, preferably by post type. When querying the database, I see our auto-drafts only go back one week, is there ...
1
vote
1answer
74 views

Page edit auto-creates blank revision and editor

I'm in the process of migrating an existing WP site to Cloudways and every time I try to edit a page the editor is blank and there's a brand new blank revision auto-saved. (Thankfully not published.) ...
1
vote
1answer
4k views

Manually removing revision post types

I'm trying to clean and optimize my WordPress database, and I'm wondering if it's safe to write a MySQL script that would purge/delete all revision post types from the wp_posts table and run it ...
0
votes
1answer
346 views

Wordpress doesn't save a post revision when changing CMB2 custom fields

I use CMB2 to add some custom fields to my posts. If i change the values of those custom fields and update the post, it doesn't create a new revision. a new revision is created only when i change the ...
0
votes
1answer
33 views

How can I make revisions more extensive?

First I must apologize as I am only using WordPress out of necessity and so may not be very well versed in the proper terminology. I have a site where WordPress serves mainly as a CMS for a pair of ...
1
vote
2answers
462 views

Is it possible to display previous post revision?

I want to be able to loop through my posts, but for every post to this: 1) check if some custom field is true or false. 2) if is true just display the post's data (the_title, the_content...). 3) if ...
2
votes
1answer
371 views

Is it possible to set custom post type revision limit inside the theme files?

i want to be able to set the revisions limit number of a specific post type. i know there is a plugin for that, and i know it can be set through the "wp-config.php" file, but my question is: Is there ...
1
vote
1answer
3k views

SQL Query for getting all posts in their latest revised state

I'm exporting my WordPress posts data to an external tool* and I wanted to write a query that will get me the current published posts from the wp_posts table but as the latest revision (i.e. latest ...
3
votes
2answers
4k views

Adding revision support to WooCommerce product content

I need to add revision support to WooCommerce Products (at least for the main content). The developers are unwilling to do this until there is some support on Wordpress for the extra product fields: ...
1
vote
1answer
1k views

Get last revision author, author-link and date

I have some trubles to get the last modified date and author from a post. <?php the_modified_author(); ?> <!--/*and*/--> <?php the_modified_date(); ?> Unfortunateli this two ...
1
vote
0answers
24 views

Updating a page won't have any effect

I tried to update my about-us page by aligning all the picture to the right. And deleted some spaces to make the page tight. But update clicking UPDATE button and view the page I still get the same ...
0
votes
1answer
53 views

revision id is one number behind - publish_post

I am currently writing a function, where I need to get the ID's of the two latest revisions, when a post is saved. However, the revisions ID's I get is one behind - it's not the 2 latest, but the 2nd ...
3
votes
0answers
46 views

Can I strip HTML tags in the “Compare Revisions” screen?

I am building a CMS for content editors that have zero tech savvy. They currently use a system called NewsCred that allows them to compare revisions much like how WordPress does when you visit /wp-...
0
votes
1answer
33 views

Can I check who updated the static front page on WordPress and the time it was done

I need to check who updated the static front page of a WordPress site and the time it was done. Is it possible? And if so how? I'm an administrator of the site and there are other administrators with ...
0
votes
2answers
2k views

Why my wp_posts data is so huge?

My WordPress has only 23 posts but the wp_posts data is over 70MiB. Is it the average size? The Posts I have were created with WPBakery Visual Composer and has 10 revisions. However, I deleted all the ...
5
votes
1answer
513 views

Wordpress 4.4+ : How to revision CPT + metadata

In WordPress 4.4+, how do you enable revisions for Custom Post Types along with their metadata? How can you get this information to appear in the diff view? I've attempted to implement what was ...
1
vote
0answers
50 views

Restose content from revisions - sql query

How i can restore all posts to the closest revision to a particular date via sql query?
4
votes
2answers
213 views

Turn revisions off in plugin instead of config.php?

Is there a function to set WP_POST_REVISIONS from a plugin instead of having to do it in config.php? I was thinking of doing this: runkit_constant_redefine( 'WP_POST_REVISIONS', 0 ); but that puts ...
3
votes
1answer
1k views

Is there a way to get a revision count of a post?

Is there a way to get the revision count number of a post? I've seen how to get the revisions but I don't want to get the revisions just the count.
3
votes
1answer
4k views

How to enable revisions for post meta data?

Normally wordpress keeps revision of wp_post table. But for generating a report I need some custom fields to be tracked while any update happens. As custom fields are saved in wp_postmeta table I need ...
0
votes
1answer
399 views

post visibility history

Revisions show past versions of the article/page but is there a way of seeing the Visibility status historically? User A publishes User B edits the published page changing the visibility to ...
1
vote
2answers
1k views

Why is wp_is_post_revision always false?

I am trying to save a revision of a custom post type. This is what I have to check if the post has a parent: function save_revision( $post ) { if ( $post['submitted'] == true ) { $...
6
votes
1answer
785 views

Storing revisions of metadata for custom post type

Storing metadata for custom post types is easy, you just need to add an action for 'save_post' with your method that handles this. In which you have then something like the following for a field that ...
1
vote
0answers
498 views

Display an old revision of a post in WP front-end theme, are there functions for this?

I have a custom post type that I've made change to a new custom post status value ("pending-change" I call it) when a change is made to any live "published" post. This works nicely and is a way for ...
5
votes
2answers
1k views

revert one revision of a post progmattically via code?

I would have thought a simple question but I can't find a function to do this in the WordPress API. I just want to revert to one previous revision as soon as a user updates a post. This would ...
0
votes
1answer
112 views

Disable revision access for a specific user role

I want to disable revision access for a specific user role. I saw the code posted here: Enable/disable post revisions programmatically but am worried that even with a clause to check the current ...
2
votes
1answer
79 views

Cannot limit post revisions

I don't know why but I cannot limit post revisions even though I've added the code define( 'WP_POST_REVISIONS', 3 ); Is there anything wrong in adding the code to wp-config file? Here are images of ...
5
votes
1answer
883 views

How to add internal, revision comments to page updates

I'm not sure the proper WP parlance for this, but I'd like to add historical comments to submitted page updates for version control purposes or as a supplement to the Revisions Browser. (Something ...