Title: WP version control
Last modified: October 16, 2024

---

# WP version control

 *  [raymallon](https://wordpress.org/support/users/raymallon/)
 * (@raymallon)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/wp-version-control/)
 * Hi, we need to be able to provide a view of what information was contained on
   our website at any given point in time in case there’s an issue with a customer
   complaint. Is it possible to retrieve a view of page/post content depending on
   date? I’ve tried WP plugin VersionPress but its not suitable for production. 
   Is this functionality possible?
   rm
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwp-version-control%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Marcio Duarte](https://wordpress.org/support/users/pagelab/)
 * (@pagelab)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/wp-version-control/#post-18077454)
 * Hi [@raymallon](https://wordpress.org/support/users/raymallon/),
 * WordPress includes a built-in feature for [Revisions](https://wordpress.org/documentation/article/revisions/),
   which tracks every change made to your post or page content over time.
 * You can access it directly on the Post or Page Editor on the sidebar at the right
   of the screen. If you need support for Custom Post Types, just enable it when
   it’s registered.
 * If you’re using a block theme, this will track all content from the website.
 * For classic themes, you could install a backup plugin or add something like [Simple History](https://wordpress.org/plugins/simple-history/)
   or [Activity Log](https://wordpress.org/plugins/aryo-activity-log/) to track 
   changes in widgets, settings, media, etc.
 * To track files via Git, you can use [Revisr](https://revisr.io/) or [Gitium](https://wordpress.org/plugins/gitium/)–
   or create a regular Git repository on your wp-content folder if you control your
   server and need a more granular setup.
 *  [Dilip Modhavadiya](https://wordpress.org/support/users/dilip2615/)
 * (@dilip2615)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/wp-version-control/#post-18083787)
 * Hello [@raymallon](https://wordpress.org/support/users/raymallon/),
 * To achieve version control of page or post content based on a specific date in
   WordPress, you can use the built-in Revisions feature. WordPress automatically
   saves revisions of pages and posts, allowing you to restore or view past versions
   based on the date. However, to retrieve and display a specific revision programmatically,
   you can use the following solution:
 * Use wp_get_post_revisions() to retrieve past revisions of a post or page based
   on the ID.
 * Add this function to your functions.php file to display the content of a specific
   revision by date:
 * function get_revision_by_date( $post_id, $revision_date ) {
   $revisions = wp_get_post_revisions(
   $post_id );foreach ( $revisions as $revision ) {if ( $revision->post_date <= 
   $revision_date ) { return apply_filters( ‘the_content’, $revision->post_content);}}
   return ‘No revision found for this date.’;}To call this function, pass the post
   ID and the desired date (e.g., get_revision_by_date(123, ‘2023-10-01 00:00:00’);).
   This retrieves and displays the content for the closest revision on or before
   the specified date.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP version control’ is closed to new replies.

## Tags

 * [git](https://wordpress.org/support/topic-tag/git/)
 * [plugin](https://wordpress.org/support/topic-tag/plugin/)
 * [version control](https://wordpress.org/support/topic-tag/version-control/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 3 participants
 * Last reply from: [Dilip Modhavadiya](https://wordpress.org/support/users/dilip2615/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/wp-version-control/#post-18083787)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
