Bulk search/replace text within Confluence pages under specified parent page.


We would like to search and replace texts within Confluence pages under specified parent page.

Let's say we've got following page structure,

Parent page

--Child page 1 (contains text "a")

--Child page 2 (contains text "a")

--Child page 3 (contains text "a")

We would like to replace text "a" within child page 1 to child page 3 with text "b" at once.

Is there any remote API available to achieve this, or do we need to create plugin for this purpose? Please advise.


Daisuke Niwa

1 answer

1 accepted

0 votes
Accepted answer
I can think about using the Confluence CLI and a bit of scripting to do it. Download the content as wiki, do search and replace and upload it back.

Thank you for your response. I went through the documentation of Confluence CLI but could not find a method to replace certain character.


Is it possible for you to let me know which method I should use?


Daisuke Niwa

Actually, "storePage" methold supports "findReplace" parameter which finds and replaces text within Confluence page.

Thanks, that helps!

Ah no, I meant to write a script which uses CLI. Do this in the script: 1. Use CLI with getPage option first, it will write a file 2. Do the replace operation in a file, there are famous perl one liners for that or use sed 3. Use CLI with storePage option and upload back to Confluence.
Ah great. That makes it easy.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,028 views 51 8
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