Title: WP-Post-Meta-Revisions
Author: Adam Silverstein
Published: <strong>December 4, 2014</strong>
Last modified: July 17, 2023

---

Search plugins

![](https://ps.w.org/wp-post-meta-revisions/assets/banner-772x250.jpg?rev=1038298)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/wp-post-meta-revisions/assets/icon-256x256.png?rev=1038294)

# WP-Post-Meta-Revisions

 By [Adam Silverstein](https://profiles.wordpress.org/adamsilverstein/)

[Download](https://downloads.wordpress.org/plugin/wp-post-meta-revisions.2.0.0.zip)

 * [Details](https://wordpress.org/plugins/wp-post-meta-revisions/#description)
 * [Reviews](https://wordpress.org/plugins/wp-post-meta-revisions/#reviews)
 * [Development](https://wordpress.org/plugins/wp-post-meta-revisions/#developers)

 [Support](https://wordpress.org/support/plugin/wp-post-meta-revisions/)

## Description

This plugin implements a post meta revisioning feature as arrived at in https://
core.trac.wordpress.org/ticket/20564.

The goal of releasing this code as a plugin is to allow as many people as possible
to easily test the post meta revisioning feature, and also hopefully move towards
inclusion of the feature into core, following the [Features as Plugins](https://make.wordpress.org/core/features-as-plugins/)
model.

Further development of the code for this plugin will continue on its [GitHub repository](https://github.com/adamsilverstein/wp-post-meta-revisions).
Pull requests welcome!

To use this plugin, you must be running WordPress 4.1 or newer, two hooks were added
in 4.1 that are required for this implementation.

To revision a post meta, you add its key via a filter:

    ```
    function add_meta_keys_to_revision( $keys ) {
        $keys[] = 'meta-key-to-revision';
        return $keys;
    }
    add_filter( 'wp_post_revision_meta_keys', 'add_meta_keys_to_revision' );
    ```

Features:

 * Allows for a whitelisted array of ‘revisioned’ meta keys (which can change at
   any time)
 * A revision for the meta is stored on save (if the meta value has changed)
 * A meta revision save (if changed) is also triggered during auto-saves
 * Restoring a revision restores the revisioned meta field’s values at that revision(
   including auto-saves)
 * Supports storing of multiple values for a single key (and restoring them)
 * Adds revisioned meta to the preview data via get_post_metadata
 * Includes unit tests demonstrating feature
 * Travis CI tests integrated with GitHub repository, props @mattheu

## Screenshots

[[

[[

## Reviews

![](https://secure.gravatar.com/avatar/6cfc8c01f1ea3a75ec6f7dba8f2a014ef4cca4fd63a50fb3c8772e492e472ecc?
s=60&d=retro&r=g)

### 󠀁[Doesn’t work in 6.2, lots of PHP warnings etc](https://wordpress.org/support/topic/doesnt-work-in-6-2-lots-of-php-warnings-etc/)󠁿

 [Dennis Bareis](https://profiles.wordpress.org/dbareis/) April 2, 2023

I assume it used to work, didn’t work for me.

![](https://secure.gravatar.com/avatar/35314daa56602a02eb8470bb014971b2b9d090bb75b38792ac1399fb066a2650?
s=60&d=retro&r=g)

### 󠀁[Still working fine](https://wordpress.org/support/topic/still-working-fine-7/)󠁿

 [Marcos Nakamine](https://profiles.wordpress.org/marcosnakamine/) September 24,
2021

I tested on WP 5.8.1

![](https://secure.gravatar.com/avatar/344653ee76e4fc90cb406062cd8a6fc04977571f5eb09af7ae58736249d65f98?
s=60&d=retro&r=g)

### 󠀁[Freakin' sweet!](https://wordpress.org/support/topic/freakin-sweet/)󠁿

 [Ryan Hellyer](https://profiles.wordpress.org/ryanhellyer/) September 3, 2016

DUDE! Why did I never think of this before? This is an awesome idea! I haven’t even
installed the plugin and you are getting five stars straight off the bat for solving
a problem I didn’t even know I had. Thanks 🙂

 [ Read all 5 reviews ](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/)

## Contributors & Developers

“WP-Post-Meta-Revisions” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Adam Silverstein ](https://profiles.wordpress.org/adamsilverstein/)

[Translate “WP-Post-Meta-Revisions” into your language.](https://translate.wordpress.org/projects/wp-plugins/wp-post-meta-revisions)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/wp-post-meta-revisions/),
check out the [SVN repository](https://plugins.svn.wordpress.org/wp-post-meta-revisions/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/wp-post-meta-revisions/)
by [RSS](https://plugins.trac.wordpress.org/log/wp-post-meta-revisions/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0.0

 * Post meta storage mechanism simplified to use copy approach. This change updates
   the way meta is stored on the revision to mirror the meta on the post it is created
   from. props @aaemnnosttv, see https://github.com/adamsilverstein/wp-post-meta-
   revisions/pull/56.
    NOTE: This is a breaking change – restoring revisions saved
   in the previous format may result in the array of values restored as a single
   value rather than adding a value for each item in the array. The storage of single
   meta values is unaffected.

#### 1.0.0

Tagging release as 1.0.

#### 1.0.0

 * Simplify by no longer storing whitelist per revision.

#### 0.1.9

 * Initial release.

## Meta

 *  Version **2.0.0**
 *  Last updated **3 years ago**
 *  Active installations **400+**
 *  WordPress version ** 4.1 or higher **
 *  Tested up to **6.2.9**
 *  [Advanced View](https://wordpress.org/plugins/wp-post-meta-revisions/advanced/)

## Ratings

 4.2 out of 5 stars.

 *  [  4 5-star reviews     ](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-post-meta-revisions/reviews/)

## Contributors

 *   [ Adam Silverstein ](https://profiles.wordpress.org/adamsilverstein/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wp-post-meta-revisions/)