Update to WordPress Simple Stats

For my February 12 Apps in 12 Months project I wrote a script to produce some simple statistics from a WordPress installation. Looking back at it I realised that it only produced stats for all time and not the previous year, which is what I wanted.

I revisited the code and added in some counts for the previous year and updated the output. You can grab the latest code here but I came across an issue which I thought I would cover here as it might be useful for others.

504 Gateway Timeout

When running the script for another … Read the rest

Vibe Coding a WordPress Plugin

I’ve written a lot of code this year and the vast majority of it I did without too much help. However, I did turn to AI (mostly ChatGPT) when I needed either a specific function written or some help with a particular issue.

What I hadn’t done was use AI to write a complete program without any code from me. I believe that this is termed “Vibe Coding“, named Collins Dictionary’s Word of the Year for 2025. Not a phrase that particularly appeals to me but I don’t get to choose.

Going with the Flow

Then, yesterday, … Read the rest

Automatic WordPress Plugin Updates

I wrote a plugin for our local U3A group, but I didn’t want to add it to the official WordPress.org repository as it had no relevance to the general WordPress user base. However, I still wanted to make it as easy as possible for people to install and update but WordPress won’t know how to check for updates on its own. That’s where Plugin Update Checker comes in.

Plugin Update Checker is a lightweight PHP library that adds WordPress-style update notifications to custom or private plugins. Once configured, your plugin behaves just like an official WordPress.org hosted plugin: WordPress checks … Read the rest

Exporting WordPress Posts to Day One

For this month’s “12 Apps in 12 Months” challenge I decided that I wanted to try and import my WordPress posts into the Day One app. Given that Day One is now owned by Automattic who also “own” WordPress I was surprised that something like this didn’t already exist as an option within the app.

Into the Unknown

As a local app, albeit one with cloud storage and syncing, there isn’t an API for Day One. Instead there is a CLI which you can use to create new entries from the command line. This was the approach I took to … Read the rest

Moving a WordPress Install to a New Domain

Over the years in both my professional and personal lives I have had to move WordPress sites to new homes that required changing the domains. This has led me to develop a set of instructions that I use successfully every time I migrate.

The first warning I should give is that what follows is not the only things you have to do but it is a decent starting point.

Updating the Database

The second warning is that here be dragons. The following requires making direct changes to the WordPress database which could lead to your site no longer working. … Read the rest

Simple WordPress Post Stats

Every year, over on my personal blog, I write a round-up post covering what I have done during the year. This includes books read, films watched steps taken etc. What it has never covered are my creative endeavours which would be my developments over at Github and my blog posts.

Where are the WordPress Stats?

I sort of assumed that there would be stacks of stats in the WordPress dashboard but no if you want that you have to install Jetpack and get the nagging messages asking you to upgrade. These stats are very similar to what you … Read the rest

Update to WordPress Posts to PDF – Final Version

I have just pushed what will be the last version of my script to export your WordPress posts to a nicely formatted PDF file to my GitHub page.

Firstly, the good news. This version now supports BLOCKQUOTEs which means that the WordPress quote block is rendered in a way that it is more obviously a quote. There has also been an improvement in the output of code blocks but support for this is still pretty basic but does now work.

Now the bad news. While looking at the output from my own sites I found that some posts weren’t … Read the rest

Update to WordPress Posts to PDF – Code Blocks

At the back end of last year I released a script that allowed you to export your WordPress posts to a nicely formatted PDF file. In the last update, I said that I wanted to add proper formatting for code blocks and today I have done that. You can find it on the GitHub page.

This proved to be more difficult than I had anticipated. The code uses the FPDF package and extends out the “Links and flowing text” example provided. I knew I needed to convert all <pre</preblocks to be displayed as … Read the rest

Update to WordPress Posts to PDF

A few weeks ago I released a tool that allows you to export your WordPress posts to a nicely formatted PDF file. I have today pushed some changes to the code which you can find on the GitHub page. This includes the following:

  • Heading (H1, H2 & H3) tags are all now supported
  • List (ordered & unordered) tags are now supported
  • Inline images (not supported) captions are silently dropped
  • A new command line parameter to choose the order of output
  • Progress now shows the number of posts out of the total processed (see image below)
  • Improvements in the
Read the rest

Exporting all WordPress Posts to PDF

I had a requirement to export all my WordPress blog posts into a nicely formatted PDF file and so I looked at plugins that were available to do the job, of which there are a few. I tried some and none worked for me giving no output at all so I decided I would roll my own. Here’s how you can use that code to download your posts to PDF too. You can see an example of the output at the bottom of the post.

To do this required two things: accessing my posts via the WordPress API and … Read the rest