7 Minute Miles

Mastodon and WordPress


Next Sunday will be my three month anniversary on Mastodon and I’m liking it more and more each day. I’ve discovered lots of new people to follow and I’m now trying to post more like I did on Twitter. I had been a little hesitant to create a lot of content on Mastodon because there wasn’t a mechanism to capture those posts on my WordPress-based website like I used to do with the Import Tweets as Posts plugin. But that all changed this weekend…

As of today, the WordPress plugin repository has 38 plugins that are tagged with Mastodon, so I thought it was time to take a look at these in more detail. When WordPress.com owner Automattic purchased Matthias Pfefferle’s ActivityPub plugin, I decided to install and activate it here. Out of the box, it allowed me to see 7 Minute Miles posts by following “@dmk @7minutemiles.com” in my Mastodon client (no space). There are a lot of other options with that plugin that I still need to explore, including their list of other recommended ActivityPub-related plugins like Friends and NodeInfo.

The other big find this weekend was Marco Hitschler’s TootPress plugin. I was a little hesitant to test this one, as it showed fewer than ten active installations and had limited documentation. I was also a little scared that it created new tables in my database to store Mastodon posts (instead of the standard post storage method) and did it’s own thing in my uploads folder for storing images from Mastodon. It also required some API setup on the instance side, which actually turned out to be much easier than getting access to the old Twitter APIs.

So what do you get when all of this is set up? 7minutemiles.com/mastodon/

Since each Mastodon post is not a “real” WordPress post, they need to be on a dedicated page and not mixed in on the main page like I had before with tweets. I think I’m OK with that for now – everything else seems to work great (with the exception of pagination, which I’ve asked about on the support forum). There is a cron job that runs every 15 minutes to check for new Mastodon posts and any attached images seem to be handled correctly (including the alt text). It also captures the time stamp and embedded URLs just work. Nicely done, Marco!

UPDATE: pagination is working now, so I’m not sure what was up with that (I didn’t change anything).

Originally published by DK on April 16, 2023 at 10:59 pm in Longform, Mastodon, Technology


flourish icon