WordPress resource site for WordPress Beginners with easy to understand WordPress tutorials for mastering the basics and beyond.

WordPress Guide

WordPress Guide

Uploading HTML file to WordPress using Gutenberg 

  • Step 1: Log into your WordPress dashboard.
  • Step 2: Create a new page or post.
  • Step 3: Create a new block by clicking on the + sign on the page. 
  • Step 4: Search for File. This option allows you to upload your HTML file:

Uploading HTML file to WordPress using Classic Editor

  • Step 1: Log into your WordPress dashboard. 
  • Step 2: Create a new page or post.
  • Step 3: Select Add Media and upload your HTML file here. 

Uploading HTML files to WordPress using cPanel

  • Step 1: Log into your web host account and access cPanel
  • Step 2: Select File Manager and then choose the folder called public_html
    • This folder should contain three more folders called wp-admin, wp-content, wp-includes.
  • Step 3: Create a folder here by clicking on the ‘+ Folder’ option from the top bar menu, and name it something of your choice.
  • Step 4: You can upload a zip file here
    • you need to rename your file to index.html to index.php
  • Step 5: Now you can right-click on the folder and Extract its contents
  • That’s it, you’ve successfully uploaded the HTML file to your site. 

How to Upload HTML File to WordPress in the WordPress Dashboard

  • To upload an HTML file through a post or page
  • insert a ‘File’ block WordPress editor
  • Then, click Upload to upload the HTML file.
  • Or using the Classic Editor. Just click Add Media and then Upload to upload your HTML file.
  • Choose the HTML file you want to upload and then click Insert into post.
  • You can skip uploading the HTML file to a post or page in WordPress and upload it directly to your Media Library. >>Click Media Library in the WordPress dashboard,>> then Add New, and choose the HTML file from the place you have it saved (e.g., your computer, hard drive, or external storage).
  • Keep in mind, you might encounter an error when you upload your HTML file while using Gutenberg.
    • Fix the “Sorry, this file type is not permitted for security reasons” Error in WordPress
      • By editing your site’s wp-config.php file
        • Add New Permitted File Types Using wp-config.php
        • ALLOW_UNFILTERED_UPLOADS
      • By using a free WordPress plugin
      • Use the Free WP Extra File Types Plugin
      • The free WP Extra File Types plugin at WordPress
      • Once you install and activate the plugin, go to Settings
      • Extra File Types
      • Check the box next to the file type(s) that you want to be able to upload and then click Save Changes

How to Upload an HTML File to WordPress

  1. Navigate to your Admin Dashboard.
  2. Click ‘Posts’ in the left sidebar.
  3. Choose an existing post or create a new one.
  4. Click ‘Add Block.’
  5. Add a ‘File’ block.
  6. Choose your HTML file.

How to Add an HTML Page to WordPress

How to upload an HTML file to your website. So let’s get started, before starting first we need to Add your HTML page, CSS, and other folders in a ZIP file. (you can simply Right-click the HTML folder and click Compress here I had used 7zip).

If you don’t know how to compress your website files using 7zip do check out our video guide regarding the 7zip compression tool. Now the first step completed. next, go to the cPanel of your hosting account. In the cPanel, scroll down to the Files section and then click on the File Manager. Select public_HTML which is the root folder of your website now-here click on the upload button.

For the demonstration am going to upload the contact page for my website. Now upload the zipped HTML file you want to add. just drag and drop your zipped file from your local system. Warning: while uploading your HTML files to the website make sure you don’t overwrite any files. Because it will crash your existing website Your zipped HTML file is now in the folder.

now Select the file right click and click on Extract again click on the extract and then the last Click on Close. Now we have successfully uploaded and extracted the HTML file into our website root directory here is the file. (If you want you can delete the ZIP file.

It won’t affect your extracted HTML page or any other folders.) so just delete the file. sometimes it can cause a 404 error if you simply uploaded your HTML page and tried to access it.

Now here we compted all steps we successfully upload, extract, and moved out HTML files to the website root directory. now let’s Preview the HTML page open a new tab type yourdomain.com/HTMLFileName.html. And here is our HTML page for a demonstration I have uploaded this contact page.

You now know how to upload HTML files to your website. If your facing any issue while uploading HTML files to your website let me know in the comment section below I would be happy to help you.