Overview
WordPress stores revisions for posts by default. Editors may want to see how many revisions exist directly in the Posts list without opening each post.
A custom admin column hooks into manage_posts_columns and manage_posts_custom_column.
Implementation
In your theme's functions.php or a small plugin, register a column header and render the count with count(wp_get_post_revisions($post_id)). Optionally link to the revisions screen.
Apply the same pattern for custom post types by replacing posts with the post type slug.
When implementing guidance from Revision Count in Posts Admin Screen in WordPress, start in a controlled environment that mirrors production versions of operating systems, runtimes, and network policies. Capture a baseline before changes: export configs, snapshot VMs, or tag releases in source control so rollback stays straightforward if behavior regresses.
Document prerequisites, expected outcomes, and verification steps in a short runbook. Automated checks—smoke tests, health endpoints, or query validations—catch regressions early when platforms receive patches. Security belongs in every workflow: apply least privilege, rotate secrets, and review audit logs after deployment.
If results differ across machines, compare environment variables, permission models, time zones, and regional settings. Intermittent issues often trace to caching layers, stale DNS, or duplicated services bound to the same port.
Example
add_filter('manage_posts_columns', function($cols) {
$cols['revision_count'] = 'Revisions';
return $cols;
});
add_action('manage_posts_custom_column', function($col, $post_id) {
if ($col === 'revision_count') echo count(wp_get_post_revisions($post_id));
}, 10, 2);
Tips
- Limit revisions with WP_POST_REVISIONS in wp-config.php.
- Large revision counts inflate database size.
- Use capability checks before showing sensitive data.
- Sortable columns need extra manage_sortable_columns filter.
- Re-verify after reboots, certificate renewals, or failover exercises.
- Align monitoring and alerts with the failure modes described in this guide.
- Keep vendor documentation links handy for breaking changes between versions.
- Pair automation with a manual spot check during initial production rollout.