Import or Embed HTML in WordPress
Upload an HTML file as an editable draft Page or preserve its styled layout in a safer sandboxed embed.
What the HTML importer plugin does
The plugin reads one HTML document at a time. It can extract the document title and body into a normal draft Page, or store a sanitized full document that you place with a shortcode. You can also create both versions in one upload.
How to import HTML into WordPress
Open Plugins → Add New → Upload Plugin, select the downloaded ZIP and activate it.
Open Tools → HTML Page Importer, choose an .html or .htm file and select an import mode.
Edit the new draft Page, or copy the generated shortcode into a post, Page or compatible widget.
Choose the right import mode
| Mode | Best for | What to expect |
|---|---|---|
| Editable draft Page | Articles and reusable content | WordPress keeps allowed post HTML and lets you edit the result. |
| Sandboxed embed | Standalone layouts and styled documents | Embedded CSS can remain, but uploaded JavaScript is removed. |
| Create both | Comparing both results | You receive one draft Page and one shortcode. |
Frequently asked questions
How do I import an HTML page into WordPress?
Install the plugin, open Tools → HTML Page Importer, choose an HTML file and select Editable draft page.
Can I import HTML as a WordPress Page?
Yes. The plugin extracts the body content, applies WordPress's allowed post markup rules and saves a draft Page for review.
Can a WordPress plugin embed an uploaded HTML page?
Yes. Choose Sandboxed embed shortcode, then paste the generated shortcode into the WordPress content where it should appear.
Can I add custom HTML code to WordPress?
You can use WordPress's Custom HTML block for a small snippet. This plugin is useful when you already have a complete .html or .htm file.
Will CSS and JavaScript be imported?
Embedded style blocks and inline CSS can remain in sandboxed mode. JavaScript is removed to prevent uploaded code from running in the visitor's browser.
Does the plugin import images and external files?
It imports the HTML document itself. Public absolute asset URLs can keep loading, but relative images, fonts and stylesheets must be uploaded separately and linked correctly.
Can imported HTML break my WordPress theme?
The editable mode uses WordPress content sanitization. The embed mode isolates the document inside an iframe, which helps stop its CSS from changing the surrounding theme.
Is the HTML importer plugin free?
Yes. The beta download is free and does not require an account.