Guide · Atlassian facts checked against its docs, 13 October 2026
Confluence HTML export template: how to change Page.htmlexport.vm
On Data Center, every page in a Confluence HTML export is rendered through one Velocity template, Page.htmlexport.vm, inside the main Confluence JAR. A server admin can override it. Cloud has no documented equivalent. Here's what the export contains, where the template lives, how Atlassian says to change it, and what to watch for.
What an HTML export contains
On Data Center, go to the space, select Space tools, then Content Tools, then the Export tab, and pick HTML. A Normal Export renders every page you're allowed to see; a Custom Export renders only the pages you tick. Confluence gives you a zip. Atlassian notes that attachments are placed in a folder per page, named after the page ID. In the exports we work with, a space zip looks like this:
SPACEKEY/
index.html
Getting-Started_65540.html
attachments/65540/…
images/…
styles/site.css
index.html: the space's page list, nested as in Confluence.- One file per page, named after its title and page ID.
attachments/: each page's files, in a folder named after its page ID.images/andstyles/site.css: Confluence's icons and the one stylesheet every page shares.
Each page file has the same frame around the content: breadcrumbs, the page title, a "Created by … last modified by … on …" line, the page body itself, a list of attachments, and a "Document generated by Confluence" footer. That frame is what the template controls. The page body inside it is rendered from the page's storage format, so macros arrive as their output, not as editable macros. Blog posts aren't included, and comments are optional.
Source: Atlassian's export documentation for Data Center. Step-by-step instructions for both editions are in our guide to exporting a Confluence space.
Where Page.htmlexport.vm lives
Atlassian's export documentation says that to customize the HTML output you modify confluence-x.y.z-jar/com/atlassian/confluence/pages/Page.htmlexport.vm, where x.y.z is your Confluence version. The main JAR sits under <install-directory>/confluence/WEB-INF/lib/. The .vm file is a Velocity template, the server-side template language Confluence uses to render page content, so it mixes HTML with $variables and #if / #set directives.
Sources: Atlassian's export documentation and Velocity template overview.
How to change it
Atlassian's knowledge base article on editing files in Confluence JAR files describes the steps. It's marked Data Center only, and Atlassian says it can't guarantee support for it: you use it at your own risk.
- Shut down Confluence and copy the JAR somewhere safe.
- Extract the JAR into a working directory with
jar xf(or any unzip tool) and findcom/atlassian/confluence/pages/Page.htmlexport.vm. - Edit the copy.
- Put it where Confluence looks first. A file placed under
<install-directory>/confluence/WEB-INF/classes/, at the same path it had inside the JAR, overrides the one in the JAR. Here that's<install-directory>/confluence/WEB-INF/classes/com/atlassian/confluence/pages/Page.htmlexport.vm. Atlassian also describes repacking the JAR withjar uvfinstead; the override is easier to undo, because deleting the file and restarting brings the original back. - Restart Confluence and run a small Custom Export to check the result.
This is general information, not support from Tablewide. Changing files in Confluence is at your own risk: back up first, try it on a test instance, and check that it fits your Atlassian license and support terms. We can't help with a modified Confluence install.
Why admins edit it, and what breaks
The usual edits are to the frame, not the content: a company logo and colors in place of Confluence's, dropping the breadcrumbs, the "Created by" line or the "Document generated by Confluence" footer, or adding a header so the export reads as a static internal site. Things to know before you do:
- Upgrades don't carry it over. Atlassian's manual upgrade guide says to reapply customizations to the newly upgraded installation directory, and to test them first, as changes to Confluence can make customizations unusable. A template copied from an older version may not match what the new version passes to it.
- Every node needs it. On a Data Center cluster, each node has its own installation directory, so the file has to be on each one.
- It changes every HTML export on the site, for every space and every user, not just yours.
- Tools that read exports expect the default frame. Importers, ours included, typically find the page tree in
index.html, the content in the page body and the author line in the page header. If you're exporting to move off Confluence, export with the default template.
What Cloud allows instead
On Cloud you can't reach the template. Atlassian's Cloud export documentation covers customizing PDF exports, with stylesheets and layouts, but describes nothing similar for HTML. Your options are to post-process the zip yourself (for example, replace styles/site.css and strip the frame with a script), use a paid exporter app from the Atlassian Marketplace, or export to PDF where styling is supported.
Source: Atlassian's Cloud export documentation.
If you're exporting to leave Data Center
New customers can no longer buy Data Center, and existing sites go read-only on March 28, 2029. The smallest tier is $37,000 a year for up to 500 users; our Data Center pricing page has the tiers and dates. An HTML export is also what our importer reads to move a space into another wiki.
Tablewide runs Docmost, an open source wiki, for your whole company at one flat price with unlimited users, from $49 a month. Our importer reads the default HTML export and rebuilds the page tree in Confluence's order with the real page titles:
- Converted: code blocks keep their language, info, tip, note and warning panels become callouts, expand sections become toggles, task lists become to-dos, status labels become status pills, and links between pages, images and attachments carry over.
- Dropped: Confluence's breadcrumbs, footer and attachment list frame (Docmost has its own), table of contents and children macros, and live macros such as recently updated. Page layouts become one column. The import report lists every page where something was removed.
- Not carried: comments, page history and page permissions. Labels don't carry over yet. Where the export records it, each page opens with a line naming who created and last edited it in Confluence, and when; Docmost lists the account that ran the import as the author.
Because it's standard Docmost, you can export your pages at any time and import them into a Docmost you run yourself.
The free preview puts one Confluence space into a private Docmost wiki for 7 days, with no card. The preview terms say where your export is stored and when it's deleted.
Get a free preview See the migration service
Atlassian and Confluence are trademarks of Atlassian. Docmost is a trademark of its developers. Tablewide is not affiliated with or endorsed by either.