This Website is Completely Static Now – What Else Can I Do?

WordPress - completely static A couple of days ago, I said this website was going to be totally static by yesterday. And static it is. The only thing that didn’t work was Disqus comments, which I fixed today.

Even though I have years of experience, I’m not an expert programmer. I’ve written one or two complete applications in the last 20 years or so, but that’s it. Most of the time, I write pieces of code. Pieces that magically make their way into other people’s code sometimes. And that’s all I’ll say about that.

The Disqus Comment System for Static Websites

The Disqus comment system isn’t new. It’s been around since 2007. Some website owners love it and some website owners hate it. It used to slow down page loading a lot. The programmers have really put a lot of effort into speeding it up, but it can still seem sluggish.

After verifying, I used the code offered at Digital Inspiration, with a few changes. You’re welcome to view the source of this page and see where it’s placed. Since I’m using an offshoot of WordPress, three lines are important on the back-end. You can only see what they are after PHP interprets them:

var disqus_url = "' . str_replace( 'https://www.rtcx.net', 'https://www.rtcx.net', get_permalink() ) . '";
var discus_identifier = "' . $post->ID . ' https://www.rtcx.net/?p=' . $post->ID . '";
var discus_title = "' . $post->post_title . '";

Yes, I use a fake domain name for IP address 127.0.0.1 instead of localhost. The second line is merely so the comments already in the Disqus database will show up.

The Disqus system doesn’t load until you click “Load Comments”, which keeps it from slowing down the page load. Most people won’t click it anyway.

The Contact Page

Being completely static means I have to use my own forms. The WordPress plugins won’t work because they’re tied into the database. This website isn’t using a database at all.

I’ve placed a “mailto” link on the contact page. Sure, I’ll get spammed and probably more than usual but it doesn’t matter. Gmail takes care of the worst of it for me and the rest is a minute or two a day to clear out.

The PHP Scripts

I run three PHP scripts from the terminal. The first builds a file list. The second builds a master directory of files. The third builds a directory of changed files. None of the scripts are ready for prime-time.

It’ll probably be weeks before I’ve cleaned them up enough to share with anyone. That’s “if” I want to share them.

What else can I do?

The only thing slowing this website down is Google. The search box, the ads and the analytics code all combine to make things slower. It’s amazing that they do when you consider Google uses page speed as one of their ranking factors. Maybe that’s one of the reasons they’re pushing Accelerated Mobile Pages (AMP).

Speaking of AMP, I’ll probably jump on that train in a month or two. I’m waiting for Automattic to finish the needed changes to the WordPress plugin for it. In the meantime‚Ķ

All I can do is plug along. Even though the website seems slow to me, it’s a lot faster than some of the sites I follow from Facebook, including the big sites like Forbes.

Share this: