Is there a way to bulk rename pages in confluence?

We have a bunch of pages that are prefixed with our "product" name, which has been re-branded.  Is there a way to bulk rename these pages within confluence or is an external plugin required?

5 answers

We  use the https://marketplace.atlassian.com/plugins/com.nurago.confluence.plugins.treecopy plugin.  Using that, copy a page tree, and before copying, bulk rename pages with a find-and-replace (third screenshot).

The only way I currently know is to use the API and try to do it that way. You would need to write a script that pulls every page title, checks if that word appears in it, and if so then replace it and update the page. 

You could use Atlassian Command Line Interface (CLI):

 https://marketplace.atlassian.com/plugins/org.swift.atlassian.cli

I used it to do exactly what you have been describing.

Hi Benoit,

could you provide me some hint, which commands (or set of commands) did you use to rename bulk of pages?

Many thanks.

Mike

Thanks @Benoit Plet .

Same question as @Michal Marko , could you provide an example? Because the vendor documentation does not talk about bulk renaming:

https://bobswift.atlassian.net/wiki/display/CSOAP/User%27s+Guide

Here is an example that adds a prefix ("RG - ") to all pages and descendants:

  1. List the pages you want to use:
    --action getPageList --space "MySpace" --title "MyPage" --descendents --file "getPageListOutputFormat2.txt" --outputFormat 2
  2. Do the rename:
    --action runFromList --common "--action renamePage --space ""MySpace"" --title @entry@ --newTitle ""RG - @entry@"" --name: getPageListOutputFormat2.txt --content: @entry@" --list "Title","Id","Parent id","Author","Created","Modifier","Modified","Version","Url"

I tested your script and it's not working. The script is always trying to rename first page with name "Title", which does not exists.

Check it...

 

See attachedscr.png also print screen

Hi there! I am running into the same problem. Did you find a solution?

Cheers,

Adam

0 vote
Davin Studer Community Champion Jun 29, 2015

Another option would be to use the WebDAV add-on(comes pre-installed). You could map Confluence as a drive and then use a batch/shell/powersehell script to change them.

I think the CLI from BobSwift is the best and easiest way to do that.

As mentioned in an other answer, that the script isn't working, here a working command:

 

-a runFromPageList --space SPACKEY--title "TITLE" --descendents --common "-a renamePage --space SPACKEY--title \"@title@\" --newTitle \"PREFIX-@title@\""

Replace SPACEKEY, TITLE and PREFIX.

 

Kind regards
André

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,383 views 24 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you