Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,948
Community Members
 
Community Events
168
Community Groups

Bulk change confluence pages content

Edited
Deleted user Mar 06, 2019

My scenario is that I need to change a few pieces of text across hundreds of Confluence pages. We have a software change and our documentation needs updated.

I have found out a way to make multiple changes in Confluence using a find+replace.

  1. Copy content to a new temporary space
  2. Export only the pages to be changed, but not the whole space
    1. Export attachments, comments, labels, etc if you plan on replacing the original pages.
  3. Delete temporary space
  4. Open entites.xml in Notepad++ (or other simple text editor) and make the edits*
  5. Save
  6. Zip the exported files.
  7. Restore space in Conflunence admin console and confirm.
  8. Delete the original pages that are now modified and in the temporary space.
  9. Move the pages from the temporary space to the original space.
  10. Delete the temporary space

In my test I found that Confluence was good enough to replace the original intra-page links and excerpts when I did my test.

*Be very careful with your edits. Do not modify the space key or the space name.

5 answers

1 accepted

3 votes
Answer accepted
Deleted user Mar 06, 2019

See description. Just wanted to post the method here for everyone.

For future reference the ACLI does was made for these kinds of bulk edits!

https://bobswift.atlassian.net/wiki/spaces/ACLI/overview?homepageId=1966101

Felix:
Ensure you don't have a folder inside the zipped file. I mean, double folder over the entities and properties files.

Hey there,

I am working on post-migration issue: In the migration I have used the confluence space import to "copy" a cloud space from one organization to a new one. Which worked

However some of the links in confluence are referencing to domain of the previous organizazition which I want to update in bulk - due to the method @[deleted]  shared above.

  1. I have downloaded the part where I wanted to fix the links
  2. unzipped the exported.zip
  3. In the entities.xml file I have replaced all old-domain.atlassian.com name with the new.domain.atlassian.com
  4. zipped it again (tried both on windows and mac)
  5. run space import again

I have even tried to import it a complete new organization - same error :(

 

 

I run everytime in the same error 

"Could not locate exportDescriptor.properties in the archive!"

ConfluenceSpaceImportErrprt.png

0 votes
Bill Bailey Community Leader Mar 07, 2019

Thanks for posting this. I have thought about doing this, but wasn't sure how well it would work in practice, for example, was there some sort of checksum generated that would then become invalid.

Deleted user Mar 07, 2019

I haven't seen any ill effects yet. I had a user who is in that content all the time check it over and they said it is fine. I was careful to do very specific find and replaces because each one found >600 instances that matched my search. Get to know the entities.xml before you do a replace so that you don't accidentally replace page metadata or confluence code.

Also, export your attachments if you plan on deleting the original pages.

I did try other tests in the past where I did the following DO NOT DO THIS

  1. Export select pages as XML
  2. Do content modifications
  3. Find and replace space key with a new one like TESTSPACE
  4. Import using the Confluence space restore tool
  5. cry 

It did indeed put the pages into Confluence, but there were ill effects... Thus the crying. Here is my symptom list from my Atlassian support ticket.

Symptoms

  • Pages do exist but are only accessible if you search the name directly. 
  • Searching the parent page "December 2019 - Handover" goes to the 'page not found' error page. But, in addition to the original page being suggested the page that I imported is suggested, but that link is just a loop back to the same page.
  • I (a Confluence admin) cannot edit any child page. The pages show the open red lock restriction, but I cannot click on it. I also cannot edit the page or move the page, but the delete and copy are available.

Yea, don't do that.

Like # people like this
Deleted user May 01, 2019

@Bill Bailey , almost two months later and no complaints from the ~3 dozen people who use those pages. Just thought I'd share that update.

Like claire_eager likes this

I often use the "copy" in the Page Tree Creator Add-on to change the page titles, but I would rather have an add-on that had a 'Replace text' ability? Is there such a feature?

Like Jaap Stramrood likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events