The blog posts are back, or: Why WordPress Sucks
Posted on 22 September 2023 in Programming
Well, well. Where do I start? For about two years (since 3 October 2021, as far as I can tell), the blog posts on this site haven’t been reachable. (It’s interesting to note, I think, that the previous redesign before that was also in October, on 5 October 2020, and right now it’s the end of September, almost October again. I seem to have a thing for redoing my website at the beginning of autumn.)
For the entire year 2022, this website went without a single update, making it look like I had disappeared off the internet, leaving behind a ghost town of a website.
(The reality is that I lost my job at the end of January, then for the rest of the year I was occupied one after the other by: finding a new job, losing that job again, finding another new job, which took a LONG time, and losing my place to live in the process.)
Of course, since early this year, I’ve been updating the site regularly, letting you know what I was up to in the “Current Projects” section on the home page. Still, there wasn’t really a way to get my thoughts and ideas out, which is also what this website is for, in long- (or longer-)form writing, so it was about time I sorted this out.
All this time, the old blog posts were still there, sitting in a database—a relic of the time I used WordPress to manage this site. For the time being, the database is still the WordPress database under the hood, but I’m looking to get rid of that too.
In the meantime, I created a system to dig out the posts, and I didn’t even need a RESTful API to do it, like I thought I would. I just use MySQLi in my PHP backend code to get data from the database. Simple! Easy!
While I was creating this system, looking at the blog posts again for the first time on the new site layout instead of the old WordPress one, I was reminded of what makes WordPress so crap. All of a sudden, there’s a lot wrong with the formatting that there wasn’t before, because of the way WordPress works. For instance, WordPress neatly turns straight quotes into curly quotes (check out the page that link points to for some much-needed typography reference)—but it does so only in rendering; it doesn’t actually store curly quotes in the database. So when I pulled the posts out from the database, they had these ugly straight quotes. (You might think it does not matter, but for someone like me, who writes and has an interest in typography, it matters! It’s part of making the site look polished and professional.)
Also, the posts aren’t properly formatted in HTML. There are no paragraphs in the database (just two newlines between blocks of text that should really be paragraphs). To get the margins to look right on my site, I just put the whole text of the post in one paragraph. There are two things wrong with this: 1) it’s not one paragraph, so it shouldn’t be formatted as one; 2) in the case where I actually added a paragraph in the post (for the first test post that I added manually to the database), it broke the layout.
And then WordPress had this neat little trick where, if you put a link to a YouTube video in your post, it automatically embeds the video—but of course, again, it only does that in rendering and not in the database, so when I pulled the posts out of the database, suddenly the embedded videos were all gone.
The only solution to this, which I will now apply, is to manually go back over all the posts and format them properly IN THE DATABASE. Fortunately there aren’t that many posts, so this won’t be that much work.
From then on, I will simply use phpMyAdmin as my content management system, pre-formatting posts as proper HTML and entering them into the database directly, manually. If I grow dissatisfied with that, I might design my own content management system (equivalent to the WordPress editor), but this works well enough for now.
So, in conclusion, as far as I’m concerned, the rundown on WordPress is this: I do NOT recommend using it. Sure, if you don’t know much about coding, you don’t need that much control over the look and feel of your site, and you want to quickly set up a blog, then by all means use it. The upside of this is that it’s easy to do and it works well enough out of the box. The downside is that your site looks like literally every other generic WordPress blog site ever.
With all that said, enjoy the site! I hope you will visit regularly so you can keep up to date with what I do.Back to Writing
This page is best viewed in Netscape Navigator 3.0 with a resolution of 1024 x 768 px.