#+date: <2021-04-23 Fri 00:00:00> #+title: Build Your Own Lightweight PHP Static Comment System #+description: Learn how to create a privacy-focused, lightweight static commenting system using PHP that requires no JavaScript or external services. Perfect for static blogs and sites seeking simple server-side comments. #+slug: php-comment-system #+filetags: :php:comments:static: * The Terrible-ness of Commenting Systems The current state of affairs regarding interactive comment systems is, well, terrible. It is especially awful if you're a privacy conscious person who does not generally load third-party scripts or frames on the websites you visit. Even further, many comment systems are charging exorbitant fees for something that should be standard. Of course, there are some really terrible options: - Facebook Comments - Discourse There are some options that are better but still use too many scripts, frames, or social integrations on your web page that could impact some users: - Disqus - Isso - Remark42 Lastly, I looked into a few unique ways of generating blog comments, such as using Twitter threads or GitHub issues to automatically post issues. However, these both rely on external third-party sites that I don't currently use. * Stay Static with Server-Side Comments The main issue for my personal use-case is that my blog is completely, 100% static. I use PHP on the back-end but website visitors only see HTML and a single CSS file. No external javascript and no embedded frames. So, how do we keep a site static and still allow users to interact with blog posts? The key actually pretty simple - I'm already using PHP, so why not rely on the classic HTML =