WP Document Revisions is a document management and version control plugin. Built for time-sensitive and mission-critical projects, teams can collabora …
WP Document Revisions is a document management and version control plugin. Built for time-sensitive and mission-critical projects, teams can collaboratively edit files of any format — text documents, spreadsheets, images, sheet music… anything — all the while, seamlessly tracking the document’s progress as it moves through your organization’s existing workflow.
See the full list of features for more information.
Powerful Collaboration Tools – With great power does not have to come great complexity. Based on a simple philosophy of putting powerful but intuitive tools in the hands of managers and content creators, WP Document Revisions leverages many of the essential WordPress features that, for more than eight years, have been tested and proven across countless industries — posts, attachments, revisions, taxonomies, authentication, and permalinks — to make collaborating on the creation and publication of documents a natural endeavor. Think of it as an open-source and more intuitive version of the popular Microsoft collaboration suite, Sharepoint.
Document History – At each step of the authoring process, WP Document Revisions gives you an instant snapshot of your team’s progress and the document’s history. It even gives you the option to revert back to a previous revision — so don’t fret if you make a mistake — or receive updates on changes to the document right in your favorite feed reader.
Access Control – Each document is given a persistent URL (e.g., yourcompany.com/documents/2011/08/TPS-Report.doc) which can be private (securely delivered only to members of your organization), password protected (available only to those you select such as clients or contractors), or public (published and hosted for the world to see). If you catch a typo and upload a new version, that URL will continue to point to the latest version, regardless of how many changes you make.
Enterprise Security – Worried about storing propriety or sensitive information? WP Document Revisions was built from the first line of code with government- and enterprise-grade security in mind. Each file is masked behind an anonymous 128-bit MD5 hash as soon as it touches the server, and requests for files are transparently routed through WordPress’s time-tested URL rewriting, authentication, and permission systems (which can even integrate with existing enterprise active directory or LDAP servers). Need more security? WP Document Revisions allows you to store documents in a folder above the htdocs
or public_html
web root, further ensuring that only those you authorize have access to your work.
Customization – WP Document Revisions recognizes that no two teams are identical, and as a result, molds to your firm’s needs, not the other way around. Need to track additional information associated with a document? Departments, editors, issues, sections, even arbitrary key-value pairs — whatever you can throw at it, it can handle. Development and customization costs are further minimized by its extensive plugin API, and the WordPress Custom Taxonomy Generator makes it easy for even the uninitiated to add custom taxonomies to documents. Need an audit trail to track check-ins and check-outs? User-level permissions based on the document’s state or another custom taxonomy? Support for third-party encryption? Check out the WP Document Revisions Code Cookbook for sample code. Looking for even more advanced control of your workflow? WP Document Revisions will detect the popular workflow plugin Edit Flow, if installed, and will automatically pull Edit Flow’s advanced workflow management tools into WP Document Revisions. Simply put, virtually every aspect of the plugin’s functionality from workflow states to user-level permissions can be fully customized to your team’s unique needs.
Future Proof – Switching costs a concern? WP Document Revisions is built with tomorrow’s uncertainty in mind. Equally at home in an in-house server room as it is in the cloud, moving individual files or entire document repositories in and out of WP Document Revisions is a breeze (history and all). And since the software is open-source, you can easily add tools to automate the process of moving to or integrating with future third-party systems.
To report a security vulnerability, please email [email protected].
This plugin makes use of many action hooks to tailor the delivered processing according to a site’s needs.
Most of them are named with a leading ‘document-‘ but there are a few additional non-standard ones.
Called when the post is saved and Workflow_State taxonomy value is changed. (Only post_ID and new value are available)
In: class-wp-document-revisions-admin.php
Called when the post is saved and Workflow_State taxonomy value is changed. (post_ID, new and old value are available)
In: class-wp-document-revisions-admin.php
Called as part of the Workflow_State taxonomy when putting the metabox on the admin page
In: class-wp-document-revisions-admin.php
Called when putting the lock notice on the admin edit screen.
In: class-wp-document-revisions-admin.php
Called after trying to over-ride the lock and possibly a notice has been sent.
In: class-wp-document-revisions.php
Called when a document has been saved and all plugin processing done.
In: class-wp-document-revisions-admin.php
Called just after serving the file to the user.
In: class-wp-document-revisions.php
Called just before serving the file to the user.
In: class-wp-document-revisions.php
To maintain a reference to a document and to hold a list of published versions of the documents.
It makes use of a custom post type “document” and revisions to maintain the history of Document file uploads.
The Document file will be uploaded using the standard Media loader.
The Document file should not be accessible directly by the user, but ideally via the WP interface.
The document post record can also support Featured Images.
Since version 3.4 of the plugin, it is possible to enter a user-oriented description that can be displayed to users with the shortcodes or blocks provided with the plugin.
An audit trail of changes to published versions of the Document file.
Use will be made of the standard WP Revisions functionality to contain the Audit Trail itself.
This plugin is delivered with just one Taxonomy – Workflow_State. This shows the status of the Document file in its processing.
The records held in the database will be:
post_content contains the id of the latest Document file attachment record.
post_excerpt will contain any comment entered when the document record is updated.
As taxonomy records are held only against this Document record, there is no effective audit trail of changes to Taxonomy. Changes can be noted manually in the excerpt field
There can be multiple Attachment records, one for each Document file loaded.
The name and title of the Attachment record is set to a MD5 hash of the original file name and the load time.
The Document file name is also set as this MD5 hash.
post_parent is set to the Document Record ID.
When a PDF Document file is loaded, then standard WP processing will attempt to make a JPEG image of the first page as a thumbnail (using all sizes). These will be held in the same directory as the Document file.
If a Featured Image is loaded whilst editing the Document record, this would also have the same post_parent set, so in this case, the post_parent is set to 0 leaving the functional postmeta link to denote the presence of the featured image.
When saving a Document Record, standard WP processing will be invoked to detect a change in title, content or excerpt fields. If one is found then a Revision record is created.
There can be multiple Revision records held, one for each saving event where a change in these fields are detected.
Because the document content contains the latest Attachment ID, an upload of …
Of course. Please! WP Document Revisions is an open source project and is supported by the efforts of an entire community. We’d love for you to get involved. Whatever your level of skill or however much time you can give, your contribution is greatly appreciated. Check out the “How to Contribute” page for more information.
WP Document Revisions should work on just about any system with a browser. You can easily collaborate between, Mac, PC, and even Linux systems. Mobile browsers, such as iOS or Android should be able to download files, but may not be able to upload new versions in all cases.
Each document can have one of three “visibilities”:
A virtually unlimited number of people can view a document at the same time, but only one user can edit a document at a time.
Yes.
No. So long as the user remains on the document page (it’s okay if the window is minimized, etc.), the user will retain the file lock. By default, administrators can override this lock at any time. The origin lock-holder will receive a notification.
Yes and no. It will track who uploaded each version of the file, and will provide an opportunity to describe those changes. For more granular history, the plugin is designed to work with a format’s unique history features, such as tracked changes in Microsoft Word.
There are default permissions (based off the default post permissions), but they can be overridden either with third-party plugins such as the Members plugin, or for developers, via the document_caps
filter.
In short, any. By default, WordPress accepts most common file types, but this can easily by modified to accept just about any file type. In WordPress multisite, the allowed file types are set on the Network Admin page. In non-multisite installs, you can simply install a 3d party plugin to do the same. The only other limitation may be maximum file size, which can be modified in your php.ini file or directly in wp-config.php
WP Document Revisions was built from the ground up with security in mind. Each request for a file is run through WordPress’s time-tested and proven authentication system (the same system that prevents private or un-published posts from being viewed) and documents filenames are hashed upon upload, thus preventing them from being accessed directly. For additional security, you can move the document upload folder above the web root, (via settings->media->document upload folder). Because WP Document Revisions relies on a custom capability, user permissions can be further refined to prevent certain user roles from accessing certain documents.
In the top right corner of the edit document screen (where you upload the document or make other changes) and on the document list (where you can search or sort documents), there is a small menu labeled “help”. Both should provide some contextual guidance. Additional information may be available on the WP Document Revisions page.
WP Document Revisions will “ping” the server every minute to let it know that you have the file open. If for some reason you lose connectivity, the server will give you roughly a two minute grace period before it lifts the file lock. If it’s brief (e.g., WiFi disconnected), you should be fine, but if it’s for an extended period of time (e.g., a flight), you may find that someone else has checked the file out. You do not need to re-download the file (if no one else has modified it), simply remain on the document page to maintain the file lock.
In short, “no”, because each site’s use would be radically different. Although, you can always link directly to the permalink of any public document, which will always point the latest revision and is available on the document edit screen (right click on the “download” link), or through the add-link wizard when editing a post or page (simply search for the document you want). The long answer, is “it’s really easy to adapt a front end to your needs.” There are more than 35 document-specific API hooks, and the plugin exposes two global functions, get_documents()
and get_document_revisions()
, all of which are designed to allow plugin and theme developers to extend the plugins native functionality (details below). Looking for a slightly more out-of-the-box solution? One site I know of uses a combination of two plugins count shortcode, which can make a front end to browse documents, especially in coordination with a faceted search widget.
A chronological list of all documents a user has access to can be seen at yourdomain.com/documents/. Moreover, because documents are really posts, many built in WordPress features should work and public documents should act similar to posts on the front end (searching, archives, etc.). The plugin comes with a customizable recently revised documents widget, as well as two shortcodes to display documents and document revisions (details below).
Yes! So far WP Document Revisions has been translated to French and Spanish, and is designed to by fully internationalized. If you enjoy the plugin and are interested in contributing a translation (it’s super easy), please take a look at the Translating WordPress page and the plugin’s translations repository. If you do translate the plugin, please be sure to contact the plugin author so that it can be included in future releases for other to use.
Yes! Each site can have its own document repository (with the ability to give users different permissions on each repository), or you can create one shared document repository across all sites.
Yes. Just follow the standard WordPress SSL instructions.
Yes. You can use the Simple Taxonomy Refreshed plugin to add taxonomies, or can share your existing taxonomies (e.g., the ones you use for posts) with documents.
WP Document Revisions doesn’t use the traditional folder metaphor to organize files. Instead, the same document can be described multiple ways, or in folder terms, be in multiple folders at once. This gives you more control over your documents and how they are organized. You can add a folder taxonomy with the Simple Taxonomy Refreshed plugin. Just add the taxonomy with a post type of “Documents”, and as the “Hierarchical” set to True.
Since a document can have many categories assigned at the same time, this is logically equivalent to being in many folders simultaneously.
Take a look at the Edit Flow Plugin which allows you to set up notifications based on roles, in-line comments, assign all sorts of metadata to posts, create a team calendar, budget, etc. WP Document Revisions will detect if Edit Flow is installed and activated, and will adapt accordingly (removing the workflow-state dialogs, registering documents with Edit Flow, etc.). If you’re looking for even more control over your team’s work flow, using the two plugins in conjunction is the way to go.
Equally the PublishPress Plugin, a fork of Edit Flow, is detected and can be used with WP Document Revisions in exactly the same manner as Edit Flow.
Yes, there are few Settings. However there are many filters that allows processing to be configured to your requirement. These are described here. This will need some coding to be done.
Yes. Each document has an “owner” which can be changed from a dialog on the edit-document screen at the time you create it, or later in the process (by default, the document owner is the person that creates it). If the document is marked as private, only users with the read_private_documents capability can access it. Out of the box, this is set to Authors and below, but you can customize things via the Members plugin (head over to roles after installing).
In a post or page, simply type [documents]
to display a list of documents.
More information is on this page.
In a post or page, simply type [document_revisions id="100"]
where ID is the ID of the document for which you would like to list revisions.
More information is on this page.
Go to your theme’s widgets page (if your theme supports widgets), and drag the widget to a sidebar of you choice. Once in a sidebar, you will be presented with options to customize the widget’s functionality.
Simply call get_documents()
. Get documents accepts an array of Standard WP_Query parameters as an argument. Use it as you would get_posts. It returns an array of document objects. The post_content
of each document object is the attachment ID of the revision. get_permalink()
with that document’s ID will also get the proper document permalink (e.g., to link to the document).
Simply call get_document_revisions( 100 )
where 100 represents the ID of the document you’d like to query. The function returns an array of revisions objects. Each revisions’s post_content
represents the ID of that revisions attachment object. get_permalink()
should work with that revision’s ID to get the revision permalink (e.g., to link to the revision directly).
Yes. There’s a plugin in the WP Document Revisions Code Cookbook to help with that. Just install and network activate.
Yes. Download (and optionally customize) the taxonomy permissions plugin from the Code Cookbook. Out of the box, it will register a “departments” taxonomy (which can be easily changed at the top of the file, if you want to limit access by a different taxonomy), and will create additional permissions based on that taxonomy’s terms using WordPress’s built-in capabilities system. So for example, instead simply looking at edit_document
to determine permissions, it will also look at edit_document_in_marketing
, for example. You can create additional roles and assign capabilities using a plugin like Members.
Yes. It will need to be slightly customized to meet your needs, but take a look at the Bulk Import Script in the code cookbook.
Numbers in brackets show the issue number in https://github.com/wp-document-revisions/wp-document-revisions/issues/
Fix for 404 error when serving documents from non-standard upload directory.
Updated documentation.
the_title
filter used with only one arg (#105, props @jeremyfelt)workflow_state
is set before checking for change, props @rachelbaker.document_custom_feed
and document_verify_feed_key
filters to customize feed behavior, props @nodakjones.serve_file
now hooks into template_include
filter (rather than template_single
) to prevent potential conflict with themes/plugins hooking into subsequent filters and producing extranous output after the document is served which would result in corrupting some filesdocument_to_private
filter not properly passing the pre-filtered document object, props Marvin Rühe.enqueue_style
APIget_file_type()
breaking the global $post
variable when no document argument is suppliedserve_document_auth
filter.edit_others_documents
wp_die()
previously) and E_USER_NOTICE level error is thrown. Diagnostic information will be available via debug bar (if WP_DEBUG is enabled) or in the standard PHP error log/documents/
now supports paginationhas_archive
property changed to true
to help with theme compatibilityread_document_revisions
capability called wp_get_attachment_url()
on file attached to a revisionCall-time pass-by-reference has been deprecated
” error when running certain versions of PHPverify_post_type()
methodget_documents()
and get_document_revisions()
functions to help build and customize themes and pluginswp_get_attachment_url
to force document/revision urls when attachments are queried directly