Categories
Uncategorized

Pros and Cons of a Static HTML Website

The second disadvantage would probably be quality. Due to the extreme popularity of WordPress, there are a lot of bad plugins and themes out there. And free solutions sometimes just drop off the map entirely. Sorting through the bad to find the good can be time-consuming.

Pros and Cons of a Static HTML Website
You heard from WordPress – but now let’s dig into some of the pros and cons of a static HTML website.

There’s No Underlying Software to Maintain
We kind of talked about this a second ago, but let’s rehash it quickly here because it is one of the major benefits of static HTML.

When you use WordPress and themes/plugins, you’re responsible for updating all that underlying code and making sure there aren’t any compatibility issues. gjstatic While this is pretty simple (you usually just need to click a button), it is something that you need to do to keep your website secure and functioning.

On the other hand, if you’ve written clean static HTML, you should be able to pretty much leave things alone and never worry about updates.

Easier Access to the Underlying Code
While WordPress lets you access all the underlying code to your site, a static HTML website will make it a bit simpler to input certain types of markup. Instead of needing to deal with theme template files and the WordPress loop, everything is right there in front of you.

Struggling with downtime and WordPress problems? Kinsta is the hosting solution designed to save you time! Check out our features
For example, while there are schema plugins for WordPress, you can more easily control schema markup on a static HTML website.

What Are the Disadvantages of Creating a Static HTML Website?
While a static HTML website is certainly fine for a basic website, the main issues come about when you try to scale up, either in terms of the amount of content or functionality.

Most of these disadvantages are simply the opposite of WordPress’ advantages. Namely:

Adding or editing content isn’t user-friendly because you’ll need to dig into the code.
Adding new functionality requires that you code it yourself.
Changing how your site looks requires rewriting your CSS.
Additionally, unless you actually know HTML/CSS yourself, all of these things will also require paying a developer, whereas WordPress would let you do them yourself, for the most part.

Use WordPress as a Static Website Generator
Static website generators differ from the above two options slightly as they take a content management system’s content, such as WordPress, combine it with a theme and generate static HTML pages. Jekyll is one of the most popular ones, which you can use to host your whole website or blog on GitHub Pages and push your new content with one command. The downside? It’s not easy (to say the least) to set it up, and even for developers, it can be time-consuming.

If you have a free afternoon to learn more about Jekyll then take a look at this article by Mike Neumegen. Alternatively, a flat-file CMS like Grav can give you easier content management while still avoiding the need for a database.

If you’re technically savvy, it’s even possible to get the best of both worlds and use WordPress as a static HTML website generator. However, you just have to remember that if you use WordPress in this way, you’ll have to make sacrifices:

There won’t be any “real-time” dynamic content on your site, at all.
No recommended articles for you or widgets that change for each visitor.
You can’t use WordPress’s built-in commenting system.
Essentially, everything that is server-side (PHP) generated will become static and updated manually. Static website generators will create a complete HTML page based on your content and once it’s done, no matter how many people visit your site, it won’t be regenerated; not unless you type in a specific command on your computer.

Suggested reading: How to Upload an HTML File to WordPress.

Developers solve the commenting “problem” by either not using it at all or switching to JavaScript-based solutions, the most popular being Disqus or Facebook comments.

There are a couple of WordPress caching plugins that you can use to create static HTML files of your posts and pages, but if you’re using Nginx as your web server (if you aren’t, you really should, but that’s a topic for another article) you can just flip the full page caching switch on and set it to expire in a day or a week. The longer period you can “afford” to set it to, the better.

What happens next is that the first visitor will have the server generate the complete, cached HTML files and any consecutive visitors within the predefined expiration period will get served those files. Here a Kinsta, our servers use the nginx fastcgi cache module for page caching. How to set it up, you ask? Well if you manage your own servers here’s an extremely detailed guide by DigitalOcean that you can follow.

If you’re a Kinsta client, this is automatic for every WordPress site and the cache by default expires every one hour. You can, however, open up a ticket with our support team within your MyKinsta dashboard and request a longer cache duration. Just please make sure you fully understand the consequences of doing so.

Cloudflare Full Page Cache
You can also utilize Cloudflare page rules with WordPress and serve your entire site from cache. We provide you all the details here on how to set up Cloudflare cache for your WordPress posts and pages.

This can be very beneficial for sites that are launching an event or are expecting a huge surge of traffic. Remember though, if you are serving entirely from cache, you will most likely run into issues with WooCommerce checkout, your WordPress admin toolbar, and other various things that you’ll need to either fix or find workarounds.

Suggested reading: How to Set up Cloudflare APO for WordPress.

We Provide the Best of Both Worlds
We don’t generally recommend serving your entire site from cache unless you have time to properly test everything. For example, when it comes to WooCommerce: you can cache the “static” front page, categories, product pages (if you don’t change them too often) and then yes, it will load almost instantly! But as soon as someone clicks “add to cart” you’ll have to switch to a non-cached version otherwise they’ll see the cart always empty.

Here at Kinsta, we have server-level rules in place for ecommerce solutions and blogs to ensure what should be cached is, and what shouldn’t, isn’t.

A few examples include certain WooCommerce and EDD pages like cart, my-account, and checkout, are excluded from caching. And users automatically bypass the cache when the woocommerce_items_in_cart cookie or edd_items_in_cart cookie is detected to ensure a smooth and in-sync checkout process.

This provides you with a fasting loading WordPress site, but without having to worry about things breaking.

Cache component stack
Cache component stack

Don’t want to host your entire site with Kinsta, but want to take advantage of the dynamic functionality for your WordPress blog? You might want to look into loading your site over a reverse proxy. We support these types of setups.

WordPress or Static?
Now for the million dollar question… If you’re just building a small website that’s unlikely to change or require new content, static HTML is a fine approach. But for anything else, WordPress is almost certainly going to be a better choice. This is especially true if you don’t have access to a developer.

Its ease of use, combined with its extensibility, are the main reasons why it’s now powering over 39.5% of all the websites on the Internet. Now over to you – would you ever build a site with static HTML over WordPress? Or have you gone down the static website generator route?

If you enjoyed this article, then you’ll love Kinsta’s WordPress hosting platform. Turbocharge your website and get 24/7 support from our veteran WordPress team. Our Google Cloud powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the Kinsta difference! Check out our plans

Leave a Reply

Your email address will not be published. Required fields are marked *