How to Upload a HTML Page to WordPress without 404 Errors?

How to Upload a HTML Page to WordPress without 404 Errors?

Today, We’ll tell you how to add HTML file or page on your WordPress site. You do not require any coding knowledge, just follow our step by step guide.

Why do we need to Upload HTML Pages to WordPress?

WordPress comes with the default editor to add pages in your Site. Often, WordPress themes also add built-in templates to display our pages.

WordPress landing page plugins are also available allows you to create a beautiful page with just a drag and drop. It means we don’t need to add an HTML file or page in your site.

But sometimes, you have a static HTML page or content which you wants to use in your WordPress site. And in that case, you might need to upload a static HTML page in your WordPress Site.

Uploading HTML File to WordPress Site

1. Before uploading the HTML file to your WordPress site, Rename the index.html file to index.php.

Rename Html To Php

2. Next, add all the files including HTML, CSS, JS and other files to a ZIP archive.

To make a ZIP file, Windows users can right-click on an empty space, then select New >>  Compressed (zipped) folder.

Right Click To Make Zip File

3. Now, just drag and drop all the folders and files for your HTML page to the zip file.

Make a Zip Folder

4. In the File Manager, you need to create an empty folder in your WordPress root directory.

How to Upload a HTML Page to WordPress without 404 Errors? 1

5. A popup will appear and you have to provide the Folder Name.

6. Use that name which you wants to use as the URL of your HTML file or page and click on Create New Folder button.

Create New Folder In File Manager

7. Now, open this folder and click on Upload from the menu to upload the HTML file.

8. Here, you are not allowed to upload immediate files. You can Upload ZIP Files and unzip them in the file manager.

How to Upload a HTML Page to WordPress without 404 Errors? 2

9. Once uploaded, select the zip file and click on Extract button to extract the zip file.

How to Upload a HTML Page to WordPress without 404 Errors? 3

10. A pop will appear asking you where to extract the files. Just select the same new folder that you created and click on the Extract File(s) button.

File Manager Extract File

After extracting, you’ll be able to view all the files in your folder. Now you can delete the zip file from there. In the final, visit this page using the name of the folder like www.yourwebsitename.com/blogging.

The Server generates a 404 error if your index.php file isn’t redirected on the loading of the URL in the browser.  Add the following line to the .htaccess file located in the root folder of your WordPress website.
RewriteRule ^(.*)index\.(php|html?)$ /$1[R=301,NC,L]

This code will redirect your “index.php” file on loading the URL.