How To Clean Up Your Confluence

How do you stay on top of your Confluence? In this post, we're sharing ways to clean up your Confluence so it remains a simple and easy to navigate knowledge base.

How do you stay on top of your Confluence?

Confluence is one of the leading collaboration tools on the market, but with great power comes great responsibility. If you don’t stay on top of your Confluence it will soon lose its authority as a hub of information for your organisation.

So how do you tackle this problem?

As Head of Training at Clearvision I run regular Confluence courses and one of the concepts that I always try to encourage Confluence users to adopt is the process of “Wiki Gardening”.

If you don’t know, this involves keeping your wiki looking fresh, weeding out the old and incorrect pages, and feeding the important ones to keep them shining through (i.e, at the top of the search results!).

Confluence doesn’t come with an inbuilt system to manage this, so one of the most common questions I hear is “how do we do this? How do we find the weeds?”

All credit to Andrew Frayling who wrote this useful little solution which can be added into any confluence system as a user macro (by any system administrator).

Confluence Gardening

It’s a very simple process and ensures your wiki is pruned and clean. It lists:

Pages not updated recently
The last change date
The last author

You can then use this to make changes yourself, nudge the author, or remove clutter. You can even chose the threshold for defining “old”, 1 week, 1 month, 2 years 3 months and 6 days – it’s up to you!

Andrew’s original blog post is no longer available, but you can find the full macro code below:

## Macro title: Old Pages
## Macro has a body: Y or N (N)
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: Andrew Frayling
## Date created: 05/02/2012
## Installed by:
## Macro to display pages that have not been updated for x days
## @param numdays:title=Number of Days|type=int|desc=Enter number of days to compare|required=true|multiple=false|default=7
#set ( $allPagesInSpace = $pageManager.getPages($space, true) )
## default value handler, set default to 7 days
#set ( $numdays = $paramnumdays )
#if(!$numdays)
#set ( $numdays = “7” )
#else
#set ( $numdays = $paramnumdays )
#end
## cast the number of days to an Integer
#set ( $Integer = 0 )
#set ( $intnumdays = $Integer.parseInt($numdays) )
## negative sign the number of days
#set ( $negativeDays = (-1 * $intnumdays) )
## get a calendar object so we can calculate the
## date we wish to compare with the page modification date
## e.g. $compareDate.add(6, -7) for pages modified over a week ago
#set ( $compareDate = $action.dateFormatter.getCalendar() )
$compareDate.setTime($content.getCurrentDate())
$compareDate.add(6, $negativeDays)
Pages last updated before $action.dateFormatter.format($compareDate.getTime())
## loop through all the pages in the current space
#foreach($page in $allPagesInSpace)
## get a calendar object and for each page in space set it to last modification date
#set ($pagedate = $action.dateFormatter.getCalendar())
$pagedate.setTime($page.getLastModificationDate())
## only display pages last modified before the compare date
#if ($pagedate.before($compareDate))

#end
#end
## end looping through pages in the current space

Atlasssian expert resources

Visit our blog for expert news and articles from the Atlassian world. On our resources page you will find recorded webinars, white papers, podcasts, videos and more.

The Software Blog

Read our blog for articles offering best practice advice written by Atlassian experts, as well as the latest news concerning your software.

Software White Papers and Guides

Dive deep into Atlassian software with our white papers and guides on individual tools, partner products, services, and best practices, written by the experts.

Expert Webinars

All of our webinars are pre-recorded and available to watch on-demand. Enjoy everything from partner features to application demos and updates from Atlassian experts.

Subscribe to our Newsletter

Subscribe to our Newsletter