Resources     Blog  

  1. Home
  2. WordPress Tutorials
  3. How to Add HTML Pages in WordPress

How to Add HTML Pages in WordPress

Do you want to add an HTML page to your WordPress website? Most WordPress themes come with built-in page templates that you can use, but sometimes they are not what you are looking for. Instead, you can add HTML pages to your WordPress website to help create the page with the look you want. Unfortunately, WordPress does not have a built-in HTML page upload feature.

It is not very difficult to upload an HTML page to WordPress, but it is hard to figure out without a guide. The biggest problem is that you can make a mistake and cause a 404 page error in WordPress. Today, I will demonstrate how to add HTML pages in WordPress without causing a 404 page error.

Why Add an HTML Page in WordPress

You might still be wondering why exactly would you want to add an HTML page in WordPress when you can create your own custom page template. The answer is simple, it saves a lot of time and you might just be more comfortable with that page template. Making custom page templates is great, but it will take development time away from your website, while simply uploading an HTML page will only take a few minutes.

Since there are no downsides to using HTML pages if done correctly, why not just use them in WordPress?

How to Add HTML Pages in WordPress

Today, I will demonstrate how to add HTML pages in WordPress without causing a 404 page error. You will not need any additional plugins to accomplish this task. You will need access to your website’s cPanel. The login information is provided to you when you create an account with your web host. This process is not hard to perform and is beginner friendly.

Since you will be making changes on the backend of your website, it is a great idea to create a backup of your website. This will ensure that if anything goes wrong, you can use the backup to revert your website to before the mistake was made.

Uploading an HTML Page to WordPress

The first thing you need to do is changing some files. Locate the “index.html” file and rename it “index.php”. If you do not do this, you will have problems later on. After the file has been renamed, it is time to zip the file. Gather all of the files needed for the page, including CSS, and zip the file.

This process is slightly different depending on whether you are using Windows or Mac. For Window users, right-click the folder. Hover over the Send to option and select the Compressed (zipped) folder option. If you are on MAC, right-click and select the Compress “filename” option.

Select the Compressed (zipped) folder option.

Once the file has been zipped, you’re ready to begin uploading. Login to your website’s cPanel. Click on the File Manager option. The File Manager will allow you to access all of the files related to your website, as well as upload them.

Click on the File Manager option.

Enter the public_html folder. Click on the New Folder button at the top of the screen.

Click on the New Folder button.

Now you need to name the folder you are creating. The name of the folder will be the URL of the HTML page you are uploading. You can change this later if a mistake is made, but it’s best to get it right the first time. Click on the Create New Folder button when you are done.

Click on the Create New Folder button.

Click on the folder you just created to enter it. Now it is time to upload your HTML page. Click on the Upload button at the top of the screen.

Click on the Upload button.

Select the Zipped folder you created at the beginning and upload it. There is a file size limit, but you should not be close to reaching it with a zip file. Once the file is uploaded, you need to extract it. Select the zip file and click on the Extract button.

Click on the Extract button.

You can now delete the zip file if you wish to. It will not impact your page at all if you leave it there. Your page should now be visible on your website. Now if you try to access the page and see a 404 error, it means one of two things. First, it probably means you did not rename your file from index.html to index.php. Make sure that the file is named properly. If that wasn’t the case, then you have to make a simple code edit. Locate your website’s .htacces file and paste the following code:

RewriteRule ^(.*)index\.(php|html?)$ /$1 [R=301,NC,L]

Congratulations, you have successfully uploaded an HTML page in WordPress and learned how to fix any potential 404 error pages that might occur.  You can repeat this process as many times as you like to add more HTML pages to WordPress.

Use the Pages You Want to Use

WordPress is the world’s most popular website building platform and for a good reason. It has so many customization options to choose from like creating your own custom page templates or uploading HTML pages instead.

Odds are if you want to do something in WordPress, there is a way or a few ways to do it. Always look to see if you can do it, but also be aware of any errors what you are doing may cause before starting. If you are aware they may happen, you will be able to quickly fix them.

How easy do you find this process? Why dio you want to add an HTML page to WordPress instead of creating your own?

Author: Robert Giaquinto

Robert has been writing tutorials about WordPress and other CMS for over 3 years since joining the GreenGeeks marketing team. Thanks to this, he has had the opportunity to research and master several areas of WordPress including plugin usage, SEO, website design, and social media integration. When he is not creating content for WordPress, Robert is digging up new content ideas for environmental pieces. These range from the pollution in our air to the danger’s wildlife face. And with a bachelor’s degree in electrical engineering, he is always eager to discuss the way our technologies are affecting the environment, especially when it comes to solar energy.

Was this article helpful?

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.