How to Upload an HTML File to WordPress (Step-by-Step Guide)
So you’ve got an HTML file — maybe a landing page a freelancer built you, a template you bought, or something you coded yourself — and now you need it living inside your WordPress site. It sounds like it should be simple, but WordPress doesn’t exactly hand you an “upload HTML” button on a silver platter.
The good news: there are several reliable ways to get this done, and none of them require you to be a developer. Whether you’re running a small business site, a blog, or a client project, this guide walks you through every method, from the quickest plugin fix to manual file uploads via FTP.
By the end, you’ll know exactly how to upload an HTML file to WordPress using the method that fits your comfort level and your hosting setup.
Why Uploading HTML to WordPress Isn’t as Simple as It Sounds
WordPress is built around a content management system (CMS) that stores pages and posts in a database, not as standalone files. That’s different from a static HTML file, which is just a self-contained document sitting on a server.
When you paste raw HTML code straight into the WordPress block editor, it often gets stripped, escaped, or mangled. Scripts get blocked, styling breaks, and your carefully coded page turns into a mess of plain text.
That’s why you need one of a few proper methods: a plugin, the Custom HTML block, a child theme, or direct file access through FTP or your hosting file manager. Each has its own trade-offs in terms of cost, technical skill, and flexibility.
Method 1: Use the Custom HTML Block (Best for Small Snippets)
If your HTML file is short — think a contact form embed, a pricing table, or a tracking script — the built-in Custom HTML block is your fastest option.
How to Do It
- Open the page or post in the WordPress block editor.
- Click the “+” icon and search for “Custom HTML.”
- Open your HTML file in a plain text editor (like Notepad on Windows or TextEdit on Mac), copy the code, and paste it into the block.
- Click “Preview” to check it renders correctly before publishing.
This works well for small pieces of code, but it’s not built for full HTML pages with linked CSS files, images, and JavaScript folders. For that, you’ll want one of the methods below.
Pros: Free, no plugin needed, works on any WordPress site.
Cons: Not ideal for large or complex HTML files with multiple linked assets.
Method 2: Upload a Full HTML Page With a Plugin (Best for Beginners)
If you want to upload an entire HTML file — including its CSS and images — as a standalone page, a plugin is the most beginner-friendly route. This is the method most small business owners in the US and UK end up using because it avoids touching any code.
Recommended Plugins
- Custom HTML/CSS/JS by WebFactory Ltd — free, lets you upload HTML, CSS, and JavaScript files and embed them anywhere using a shortcode.
- WP Custom HTML — free, straightforward interface for pasting or uploading raw HTML.
- Insert Headers and Footers — useful if you’re adding HTML to specific theme locations rather than a whole page.
Steps to Upload With a Plugin
- Go to Plugins > Add New in your WordPress dashboard.
- Search for “Custom HTML” and install a plugin like the ones above.
- Activate it, then find its new menu item in your dashboard sidebar.
- Upload your HTML file (or paste the code) directly into the plugin’s editor.
- Copy the shortcode it generates and paste that into any page or post where you want the content to appear.
This method keeps your original formatting intact and doesn’t require you to touch your site’s core files.
Pros: No coding required, keeps CSS and JavaScript working, easy to update later. Cons: Adds one more plugin to maintain, and free versions sometimes limit file size.
Method 3: Upload via FTP or Your Hosting File Manager (Best for Full Control)
If you’re comfortable with file management, or your HTML file is part of a larger project with multiple pages, images, and stylesheets, uploading directly to your server gives you the most control.
What You’ll Need
- FTP client software, such as FileZilla (free) or Cyberduck (free, Mac-friendly).
- Your hosting login credentials, usually found in your hosting account dashboard.
- Alternatively, most hosts like Bluehost, SiteGround, and Hostinger include a built-in File Manager in their control panel, so you can skip FTP software entirely.
Steps to Upload via FTP
- Log in to your FTP client or hosting File Manager.
- Navigate to your WordPress root folder, usually labeled
public_htmlorwww. - Create a new folder for your HTML page, for example
public_html/my-landing-page. - Upload your HTML file along with its CSS, JavaScript, and image folders into that new folder.
- Visit
yourdomain.com/my-landing-pagein a browser to confirm it loads correctly.
This approach essentially runs your HTML file as a standalone page alongside your WordPress installation, rather than inside it. That’s useful for landing pages you don’t want styled by your WordPress theme.
Pros: Full control, works for entire multi-file HTML projects, no plugin dependency. Cons: Requires basic file management comfort, and the page won’t automatically inherit your WordPress menu or theme styling.
Method 4: Use a Child Theme or Page Template (Best for Developers)
If you’re technically inclined or working with a developer, you can create a custom page template inside your WordPress child theme and insert the HTML there using PHP’s get_template_part() or similar functions.
This method integrates your HTML fully into the WordPress theme structure, meaning it inherits your site’s header, footer, and navigation automatically. It’s the most robust option, but it’s overkill unless you’re already editing theme files regularly.
Pros: Fully integrated with your site’s design and navigation.
Cons: Requires PHP knowledge or a developer’s help; mistakes can break your live site.
Comparison: Which Method Should You Use?
| Method | Best For | Cost | Skill Level |
|---|---|---|---|
| Custom HTML Block | Small code snippets | Free | Beginner |
| Plugin Upload | Full HTML pages, no coding | Free–$29/year | Beginner |
| FTP / File Manager | Multi-file projects, standalone pages | Free (uses existing hosting) | Intermediate |
| Child Theme / Template | Full theme integration | Free, but developer time costs extra | Advanced |
Our Pick: The Plugin Method (For Most Users)
For the average small business owner or blogger, we recommend the plugin method. It strikes the best balance between ease of use, reliability, and keeping your HTML page’s original styling intact.
Custom HTML/CSS/JS by WebFactory Ltd is a solid free choice with over 90,000 active installs, and it’s been consistently maintained. If you outgrow the free version, its Pro tier runs around $29 per year and adds unlimited snippets and priority support.
If you’re managing a larger project with multiple linked files, though, the FTP method is worth learning. It costs nothing beyond your existing hosting plan and gives you the same kind of control developers use daily.
A Few Things to Check Before You Upload
Before you upload anything, open your HTML file in a text editor and confirm the file paths for any CSS, JavaScript, or images are relative, not pointing to folders on your old computer. Broken image links are one of the most common issues after migrating an HTML file to a live site.
It’s also worth backing up your WordPress site first. Plugins like UpdraftPlus (free) make this quick, and it means you can undo any mistakes without stress.
Finally, check your hosting plan’s file upload limits. Most shared hosting plans, including budget options from GoDaddy or Hostinger, cap uploads around 2MB to 8MB by default, though this can usually be increased in your hosting settings if your HTML file includes large images or videos.
Conclusion
Uploading an HTML file to WordPress doesn’t have to be complicated once you know which method fits your project. Small snippets work fine in the Custom HTML block, full pages are easiest with a plugin, and larger multi-file projects are best handled through FTP or your host’s file manager.
Whichever route you choose, take a few minutes to back up your site first and double-check your file paths before publishing. If you’re still unsure which method suits your situation, start with a plugin — it’s free, beginner-friendly, and reversible if you change your mind.
Frequently Asked Questions
Can I upload an HTML file directly to the WordPress media library?
Not by default. WordPress blocks HTML file uploads to the media library for security reasons, since HTML files can contain scripts. You’ll need a plugin, FTP access, or the Custom HTML block instead.
Will uploading HTML break my WordPress theme?
Not if you use a plugin or the Custom HTML block correctly, since these methods insert the code as its own contained element. Uploading via FTP as a standalone page also won’t affect your theme, since it runs independently outside the WordPress template system.
Is it safe to upload HTML files from a template I bought?
Generally yes, as long as you download the template from a reputable marketplace like ThemeForest or Creative Market. Always scan the files for malware first if you’re uploading through FTP, especially if the source is unfamiliar.
Do I need coding knowledge to upload an HTML file to WordPress?
No. The plugin method and Custom HTML block are both designed for non-coders, and most hosting file managers use simple drag-and-drop uploading, similar to uploading a photo to Google Drive.
What’s the difference between uploading HTML as a page versus embedding it in a post?
Uploading via FTP creates a fully standalone page at its own URL, separate from your WordPress theme. Embedding via a plugin or block keeps it inside your existing WordPress page structure, complete with your site’s header, footer, and navigation.



