Update Nov 7, 2022: Donncha wrote a similar guide to integrating WordPress and Mastodon that caught a key thing that I missed. If you’re following the instructions below, you’ll also want to install the WebFinger plugin. I didn’t seem to have problems without it but the Mastodon docs are pretty clear that WebFinger is needed for some discoverability stuff.

While my original post below still stands, to get the best experience install three plugins:

  1. ActivityPub
  2. WebFinger
  3. Webmention

Here’s a full list of steps to get your blog posts on Mastodon:

  1. Install and activate the ActivityPub plugin for WordPress

That’s it! Thank you for following along.

OK, I’d actually like to say a bit more. When I first installed the plugin, I was trying to figure out how to connect it to my Mastodon account. If you’re using WordPress, it’s straight-forward to get your blog posts on Twitter, Facebook, Tumblr, and LinkedIn thanks to Jetpack (I work for Automattic who makes Jetpack, but I don’t work on Jetpack). Jetpack works by connecting to those sites’ APIs with your account, and then posting to your account. I assumed that the ActivityPub plugin would work similarly.

But Mastodon isn’t like any of those other sites. Since anyone can run a Mastodon server, and Mastodon speaks the ActivityPub protocol, the plugin turns your blog into a server in the ActivityPub network (the “Fediverse”). You don’t need another account, your WordPress account is your account.

So how do you actually see your blog posts on Mastodon?

That part actually tripped me up. You have to go to /wp-admin/profile.php to see your Mastodon ID. I don’t know where I read that, but it wasn’t obvious to me. At the bottom it tells me that my ID is @georgehotelling@g13g.blog so I searched for that on my Mastodon server and was able to follow my blog. The format seems to be [username]@[hostname] but you should check your profile page just to be sure.

Wishlist

There are a few things I’d like to see from this plugin in the future:

  1. Remote Follow. I’d love to be able to create a remote-follow page for my blog, similar to how Mastodon has a remote follow page. The Social Icons block in Gutenberg already has a Mastodon logo, but it would be nice to be able to link to a page that lets you subscribe, like on Mastodon.
  2. Customizable Feeds. Another thing I’d like to see is the ability to create and name feeds for posts that match a WP_Query. First off I could have a shorter ID like @blog@g13g.blog or something. I could also use it with Custom Post Types to have short links (like Waxy or Kottke) on one feed, maybe photos on anther feed for Pixelfed.
  3. Replies as Comments. If someone replies to my post anywhere on the Fediverse, I want the option to include that in the comments section. (Update: if you want this, install the Webmention plugin)

Oh, and about Mastodon…

I have said it elsewhere but I love my Mastodon instance. It reminds me of BBSs back in the day, or maybe the local Livejournal group. It’s cozy with a lot of familiar faces. 90% of the content on the instance is marked “followers only” for privacy, so if you’re interested be sure to follow people you see mentioned.

Mastodon, like blogs and RSS, is also one of the last places on the web where you don’t have an algorithm choosing what you see. No one is optimizing tho software for engagement metrics. That alone is pretty valuable to me.


    Mentions

  • 💬 Tom Finley
  • 💬 Ted Tschopp: "@SamGreenwood Get a your blog to support the Acti…" – TWiT.social
  • 💬 @alexstandiford@fosstodon.org

5 responses to “Get Your Blog Posts on Mastodon”

  1. I wanted to share that I created a remote follow service that works for this use case: The format is:

    `https://apfollow.mwt.me/?user={username}&instance={domain.tld}`

    So, for example, you can have people follow you using this link:
    https://apfollow.mwt.sh/?user=georgehotelling&instance=g13g.blog

    The source code is here:
    https://github.com/mwt/apfollow/

    So you can self-host the project or just reverse proxy using the snippets in the readme there.

Leave a Reply