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 where the template lives, what it controls, how Atlassian says to change it, and what to watch for. To run the export itself, see how to do a Confluence HTML export.
Moving your Confluence pages to another wiki? Tablewide is a hosted wiki, built on Docmost, at one flat price per company with unlimited users, from $49 a month (Team, 25 GB). If your company is outside the EEA, UK and Switzerland, get a free preview of one Confluence space from a Confluence export; it's private and needs no card. Google Workspace teams there can start on their own; everyone else there uses the form and, if we can offer a preview, gets an emailed upload link. The preview and your upload are deleted 7 days after it's created (when you name the wiki, or when we send your upload link) unless you subscribe; backup copies roll off within 30 days after that. Our AI agents' working records keep copies of what they read about your preview, with no set deletion date; ask and we delete them within 30 days, and our AI provider removes its copies within a further 30 days (what we keep, and for how long). If your company is in the EEA, UK or Switzerland, use the form and don't upload an export.
Tablewide is an independent service. We are not affiliated with, sponsored by or endorsed by Docmost, Inc. or the Docmost project.
What the template renders
A Data Center HTML export is a zip with one file per page, each rendered through the template. 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 export a few pages to HTML 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.
Planning the whole move? Our Confluence migration guide has a step-by-step plan, a sample timeline and what carries over.
Organizations in the EEA, UK or Switzerland: please use the form and don't upload an export. We'll email you an offer to build your preview from your public pages (our AI agents read those pages to write it, and what they read can stay in their working records with our AI provider; nothing is built on our servers until you say yes), or tell you if that isn't possible (preview terms).
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.