Mastodon

This article is based on the already well-written article on Fedi.Tips.

The idea is to automatically make all your blog posts on WordPress available on the Fediverse that people can follow on their apps such as Mastodon.

Caution: before doing this read the notes below around the downsides to this integration.

Doing this is really easy…

  1. Note that this will only work on self-hosted WordPress installations
  2. Note that there’s very limited configuration options
  3. Install the ActivityPub for WordPress plugin
  4. Activate it
  5. Done – on the plugin settings page it will give you the username and URL that can be shared for others to follow. Any new posts will start to appear to all followers.

Quick fix: when I installed the plugin and went to the Health Checks page, it was showing that my author page was not returning valid JSON with the error:

Your author URL https://cubewebsites.com/author/Cube Websites/ does not return valid JSON for application/activity+json. Please check if your hosting supports alternate Accept headers

The reason for this issue was that the author name format in the URL is from an old version of WordPress. To fix it all you need to do is:

  1. Connect to your database using a management tool e.g. phpMyAdmin, TablePlus etc
  2. Go to the users table
  3. Find your user account
  4. Change the user_nicename field to a username/slug format i.e. no spaces, lowercase
  5. Save the changes
  6. You’ll now see that your author page starts to work and the error message goes away

Why do this?

I only set this up to test this feature out. It’s quite cool but extremely limited as it creates a Fediverse presence for your site with little to no control. From what I can tell it registers your site domain as a Fediverse server to give you a unique presence.

The following is all missing:

  • option to modify a post once it’s published
  • specify hashtags to include (very useful on Mastodon)
  • personalise your profile directly
  • receive notifications for any engagement with your content i.e. replies and favourites
  • changing your Fediverse address

The Fediverse address, it’s always @[email protected] which isn’t a particularly appealing good name in this world of vanity usernames. For profiles it will pick up your profile picture from the user account, so you can modify that. Perhaps it picks up additional fields from your WordPress user profile but I haven’t explored that far.

I made a post that I published without setting the category, so the URL includes the ‘uncategorized’ slug. After fixing this mistake, there was no way to go back and change the automatic post it’s pushed out on the Fediverse feed.

Alternative Approaches

  1. An easy option is to create a Fediverse account on an existing Mastodon server. Then connect your blog to push to this account using the API via a plugin, or via the RSS feed
  2. Setup your own Mastodon server so you can use your own server address instead of a general one, and then use that to push the same way as above
  3. Explore Friendica which seems to have the option of making RSS Feeds into Fediverse accounts

My preferred option is Option 1, and perhaps at a later date when I have the time to setup my own server, I would migrate the account to that server. It provides the most control and personalisation and means you can use the Mastodon app to engage with readers.

0
Would love your thoughts, please comment.x
()
x