How to import multiple html files into Confluence

Hi there,

I have a whole bunch of html files that I would like to pull into Confluence as part of my new wiki. The html files are not on the internet, they're on my hard disk. I can't see any way to pull them into Confluence. Even the html macro to cut and paste the html doesn't work - Confluence either hangs or comes up with a filepath error. I'm hoping cutting and pasting the content as text is not the only solution since it results in loss of formatting, and given the number of files I have, it's going to be a huge job to fix them up again.

Any advice appreciated!

4 answers

2 other possibilities to help:

  1. Confluence Html Plugin (open source version) can pull your html files out of directory on your server.
  2. Confluence Command Line Interface has support to script importing pages in general. There is also a loadFiles action for some primitive importing of html files.

Confluence CLI "loadFiles" command works well importing the content but I have just figured it embeds HTML content using the "html" macro, any chance to get the content in the Confluence native wiki format?

You should try using the UWC (Universal Wiki Converter) I think it has some support for html since pretty much just xml.

Just tried now with some HTML (not XHTML) and it didn't worked.

Go for "Confluence Command Line Interface" "loadFiles", I have just tested it and it works well, just get sure you have the "html" macro enabled in your Confluence installation (it will be disabled by default if you have migrated from OnDemand).

Now the above links seem outdated and UWC links lead to Bitbucket (does it have similar properties?).

It would be very nice to be able to import a bunch of www or other html pages so that their internal links would be preserved (even if one would have to afterwards manually edit the looks of the pages). Is there any way to do this?

We have groups that would like to import their own intranets of group pages into wiki, but I know of now other way than to copy-paste them into Confluence, remove every internal link and redo them manually, which is tedious and error-prone.

BTW, if you copy-paste the html page into Word and then copy-paste from Word to Confluence, you are less likely to get in some additional html code that may cause the page look different in the View mode (the links might be 10 - 60 letters away from their place!).

Moreover, if the formulation (such as bullet lists) go broke, maybe it is easier to edit them in Word before copying them into confluence. Sometimes the formulation has been more correct if I open an empty .rtf file in Word before copying into Word instead of copying into .docx mode.

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,465 views 114 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