Mass updates to multiple confluence spaces
Asked by Lakshmi S:

Hi Team,

We're looking into potentially making mass updates to our Confluence documentation. I wonder if you can recommend any safe mass update tools to update multiple Confluence pages?

For example, when we were renaming (Tester =\> QA Team, etc), we had to mass-update Confluence articles. Do anyone know if there is any procedure to perform this mass update?


Answers:
author: Jessie Wang_ScriptRunner_The Adaptavist Group
body: Hey [@Lakshmi S](/t5/user/viewprofilepage/user-id/11952)

We actually created a tutorial on how to mass search and replace text across Confluence on-prem using ScriptRunner for Confluence.

We have the script you can just paste in and run. Check out the script and video demo here: <https://www.scriptrunnerhq.com/inspiration/blog/find-and-replace-text-across-several-confluence-pages>

ScriptRunner is available on a [30-day free trial](https://marketplace.atlassian.com/apps/1215215/scriptrunner-for-confluence?hosting=datacenter&tab=overview) so you can install it and give it a go.

Hope that helps!

Jessie

comments: author: Jessie Wang_ScriptRunner_The Adaptavist Group
body: Just want to add for anyone on Cloud who is facing this problem, we also have a ready script available to do search and replace across your space for you. Here it is: <https://library.adaptavist.com/entity/find-and-replace-text-across-space>


author: Radek Dost?l
body: Well, you have several options, some that come to mind:

Space/Site export to .xml, modify xml files, restore space/site. Terrible, risky, most probable to lead to data loss, don't do this.

REST API, write automation scripts to download pages, modify them, upload back as page update. Meh, but gets the job done.

Java API, same concept, but you need a plugin to allow you to write groovy scripts (e.g. ScriptRunner), or write your own plugin to do the task. Probably a tad more difficult than REST, but gets the job done the same way at the end of the day given a competent coder.

Database, the db design is spaghetti but there are existing queries on the internet to fetch the content you're after, so while rather.. intimidating and non-sensical on first glance, things can be joined together to form a meaningful query and then replace the content. Of course, the most risky, and the worst choice to do this with.

Search and Replace, things like [https://marketplace.atlassian.com/apps/1212823/search-and-replace?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1212823/search-and-replace?hosting=server&tab=overview), [https://marketplace.atlassian.com/apps/1217476/find-and-replace-utility-plugin?hosting=datacenter\&tab=overview](https://marketplace.atlassian.com/apps/1217476/find-and-replace-utility-plugin?hosting=datacenter&tab=overview), [https://marketplace.atlassian.com/apps/1217137/keysight-admin-tools-for-confluence?hosting=server\&tab=overview](https://marketplace.atlassian.com/apps/1217137/keysight-admin-tools-for-confluence?hosting=server&tab=overview)

These can do the job with less effort and less "risk" you could say (provided you test and verify this on non-production first).

Altogether Confluence doesn't have a native "search and replace" for anything in bulk, so most probably you would be looking for a plugin that can do it, unless you're techy enough to write the scripts in your team which can however take huge effort to properly write/test, etc., not too straight forward.

comments: author: Lakshmi S
body: Thank you for your quick responses [@Ken McClean](/t5/user/viewprofilepage/user-id/5067619) and [@Radek Dost?l](/t5/user/viewprofilepage/user-id/715713).

As we are on the data center version, This addon seems useful for our requirement to mass-update the words.  
[Find and Replace Utility Plugin \| Atlassian Marketplace](https://marketplace.atlassian.com/apps/1217476/find-and-replace-utility-plugin?hosting=datacenter&tab=overview)


author: Ken McClean
body: [@Lakshmi S](/t5/user/viewprofilepage/user-id/11952)do you have anyone on your team that is comfortable with Python? I can write you a basic find-and-replace script, but you'd want to have someone comfortable with Python to look it over before you applied it to your system.  

Your best bet is, as [@Radek Dost?l](/t5/user/viewprofilepage/user-id/715713) said, to find a plugin to do it for you.


Tags: confluence-server

server