Quick summary
Uploading an HTML file to WordPress requires using the Block Editor to insert a Custom HTML block or a File block, then pasting or uploading your code directly to the page. This step-by-step process lets WordPress users add custom HTML content without needing a plugin or theme code changes.
Steps
- Navigate to your Admin Dashboard and click Pages in the left sidebar.
- Choose an existing page and click on it to open the editor.
- Click the Block Inserter button to open the block search panel.
- In the search bar, search for the HTML block option.
- Click Custom HTML and add it to your page.
- Alternatively, search for the File block and add it to your site instead.
- Use the Custom HTML block to paste your HTML code manually into the code block.
- In the module that appears, select the upload option to upload your file, or add it to your Media Library.
- Click Save to apply your changes.
- Your HTML file has been successfully uploaded and embedded in WordPress.



