Why Use Static Site Generator

Better security, better performance, easy to setup, lower cost, better reliability and adequate flexibility.

Better security

Dynamic website or web application using server-side code always bear higher risk of security vulnerability compared to static HTML. Wordpress is a prime target for hacking due to its popularity, and you are at risk if you didn't patch it with the latest version in time.

If you use static site generator, you automatically have better security because you use static html without server-side code.

Better performance

In terms of performance and speed, a static HTML will always load faster than HTML generated by server-side code.

Easy to setup

If you deploy a server-side web application like Wordpress, you would need to setup a web server with PHP and MySQL support.

For static website, you just need a web server. You can even host static websites on AWS S3, Google Cloud Storage or GitHub Pages.

Lower cost

A server-side web application will require a complete server instance on Google Compute, AWS EC2 or Digital Ocean/Linode. As the server-side web application becomes more popular, you would need to upgrade the instance in terms of RAM and CPU to handle the additional request.

For static website, you have additonal options to host them on AWS S3, Google Cloud Storage or GitHub Pages which is cheaper or free. Cost per web request of static website will always be cheaper than server-side web application as much lesser RAM and CPU is required.

Better reliability

A server-side web application has many dependencies like PHP and MySQL database.

  • You might installed/updated a buggy version of PHP or MySQL.
  • MySQL failed due to low resources or high demand.
  • Updating of certain packages on the server might break your web application.

Static website will always have less dependencies than server-side web application.

Adequate flexibility

A server-side web application like Wordpress is always have better flexibility than static site genarator. Wordpress have various plugins for different purpose (shopping cart, online payment, etc.) and content can be edited with an online editor.

Static site generator has adequate functionality to generate a static website, blog, tutorials, etc. It can be customized quite a lot with themes, templates and plugins. The downside is you don't have an online editor (you write your content in markdown, generate the websites and deploy to server), you can't store data into database and can't run server-side code.

If you need commenting feature, you can use Disqus.

References

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.