Carrying on the sporadic series (here are parts one and two), this is my next tinkering around with a means to connect a WordPress-based IndieWeb site to the Fediverse.

For my hackday project at IWC Utrecht I set up Matthias’ ActivityPub plugin that fully fedifies your WordPress site. It’s dead simple and most excellent.

Yes way!


How is it different to Bridgy Fed?

So previously I had a tinker with Bridgy Fed, and in addition to that I am also currently POSSEing my posts to the social.coop Mastodon instance. What’s the difference here? Without going in to too much detail (partly because I don’t know in 100% detail πŸ™‚ and partly because I hope to save that for a future post), here’s the gist of it as I understand:

  • the POSSE plugin (Mastodon Autopost) uses the public API of a Mastodon instance to post content as toots (and it only posts to Mastodon, although of course that can be read from elsewhere)
  • the WP AP plugin implements the AP protocol directly in WordPress – turning your site into an AP server, essentially, with an AP inbox/outbox and a discovery endpoint.
  • Bridgy Fed does kind of the same thing – acting as an AP server – but as a middleman between you and the Fediverse. In this case, your site continues to send and receive webmentions, rather than directly implementing an inbox and outbox in WP. If your IndieWeb stack of choice doesn’t have any ActivityPub built-in, then Bridgy Fed is definitely going to be your friend.

WP AP and Pterotype

Worth mentioning again here that there’s another WP plugin for giving your WP site an AP power boost – pterotype. I went with WP AP as pterotype seems to be in a sort of closed/sign-up beta at the moment and it looks as if WP AP plays a bit better with the other IndieWeb plugins – it’s written by Matthias after all, who has been involved in the creation of a fair few of those IW plugins.

I’ve not tried pterotype myself, but it’s definitely worth checking it out too to see if it fits your use case better.

WP, AP, YipP

Let’s do this!

So WP AP turns your blog into a fully blown actor on the Fediverse. It adds webfinger so people can search for and find you from the Fediverse, and it gives you an inbox and outbox for sending and receiving messages via AP. I’ve only tried it from Mastodon and Hubzilla, but it should interoperate with pleroma and friendi.ca too according to the plugin page.

It’s super simple to set up. Literally just install the plugin on your WP site and you should be good to go. On hackday I set it up on a test WP install – bit.doubleloop.net – and it worked straight away. That said, when subsequently trying to set it up on my main site, I hit a couple of issues that needed figuring out.

Let’s discuss the happy path first.

The Happy Path

From your WP install, just install the WP AP plugin. You’ll get a new settings section in the WP sidebar, which it is worth taking a peek at, but the defaults seem pretty sensible.

Change some things if you want, but, simple as that, you should now be able to follow your blog from the Fediverse! Your identifier is @username@example.tld. So on my test site, I had created the main user of my test site with the username bit, with the site at bit.doubleloop.net. So when searching for it, I search for @bit@bit.doubleloop.net.

(For some reason my avatar for that account seems to be cached somewhere, because it has since been changed, but doesn’t get picked up in Mastodon.)

People can now follow your IndieWeb site, but note: I don’t think you get a generic mention when someone follows you, which you do from Bridgy Fed (I think?). You can see your followers in the ActivityPub settings section though.

And now if you create a new note on your blog, it will appear in the timeline of anyone following you from the Fediverse. If they reply, it’ll come back to you as a comment on your post. C’est bon!

(Maybe a small thing but I really like how the plugin has picked up the details from my h-card and they appear as properties in my profile when viewed from the Fediverse.)

The :/ Path

When I set up the plugin on my main site, it didn’t work straight out of the box like it did on the fresh install. No results came back when searching for @neil@doubleloop.net.

A good first test when trying to discover something from the ActivityPub side of the Fediverse is to check whether webfinger is seeing some info for that actor.

Testing your webfinger resource

You can either just navigate to the webfinger resource directly and see what’s happening: doubleloop.net/.well-known/webfinger?resource=acct:neil@doubleloop.net

or you could just use the webfinger tool: client.webfinger.net/lookup?resource=neil%40doubleloop.net

(By the way, I haven’t done anything to set up .well-known – it’s all added magically by the WP AP plugin.)

That was actually returning fine for me (it has less than what Bridgy Fed’s webfinger resource does, but it matches what was in my working install of WP AP). If you get some kind of error from webfinger, you probably need to check if your web server is causing any issues with .well-known and paths within from being found.

Making sure your author archive page is present

After looking in the github issues for WP AP, I noticed that Matthias mentions that the author profile pages need to be available in WordPress for things to work. Not 100% sure as to why but I’m guessing WP AP uses this page to find out your past posts – it displays a posts count in Mastodon at least.

So yep – when I checked on my site, navigating to doubleloop.net/author/neil was redirecting to my homepage.

First I checked the IndieWeb plugins – there is in fact a setting labelled ‘If checked, this will replace the author page URL with the website URL from your user profile’ but I don’t think it actually redirects. I think it is just used in your h-card rel=me.

However it turns out that the motherfuppin’ Yoast SEO plugin is doing a redirect from the author archive page to the homepage. It’s a setting tucked away in Search Appearance / Archives / Author archives and I think it has them disabled by default. They were disabled for me. (To be honest I don’t know why I have Yoast on this site at all, I’m not really bothered about SEO.)

So I enabled the setting and tried again – still redirecting! Turns out that it seems to be a permanent redirect. I tried in a different browser that I haven’t navigated to the profile page before, and this time it showed the author archive fine.

With that change, the discovery worked fine πŸ˜€

(As a final debugging aside, while I didn’t need it here – one extra debug thing that might come in handy sometime is that you can browse all of the available endpoints provided by the AP plugin at /wp-json/activitypub/1.0)

General musings

Easy AP

All of the basics works really well out of the box with the WP AP plugin. (I did notice a few issues with more advanced use cases, listed below, but I’m sure they will be ironed out over time.)

So – with absolutely minimal effort as a user, you can install WordPress, install this plugin, and your site can pop up on the Fediverse. That’s pretty rad – awesome stuff from Matthias!

Being in both worlds

I’m really happy to have this set up on my main site and will keep it running. That said, I’m not going to advertise it much just yet – I want follow it myself for a while and see how various posts appear, and just get a feel for it. (I haven’t tested various different post kinds yet.)

For now, and possibly in perpetuity, I will keep my social.coop account and continue posting to it, because I really like social.coop as an idea (a cooperatively-run organisation providing platform services like Mastodon) and I like the local timeline. Perhaps over time I’ll only cross-post my coop-related notes there.

To be honest I’m not completely sure yet, and this is the trickier part for me – all the tech can work but from the perspective of being part of a community, what works better? I’ll see over time, and although it is probably a bit confusing it’s certainly not unheard of to have multiple Fediverse accounts.

Always worth bearing in mind that I may well want to have multiple identities with a hard separation between them.

Displaying everything to everyone?

Another thing to note: I don’t think there is currently a way to choose what appears in your Fediverse stream. So if someone follows you, they get everything you post to your site – notes, articles, photos, likes, bookmarks, etc. I think that would be true even if I separated various posts from my main feed, as I think WP AP is using my author archives for determining what to send to the Fediverse. Although I’m not sure – to be determined.

C2S

When you combine this with IndieWeb’s Micropub, if you squint a little you have kind of gotten client-to-server (C2S) working for a generic ActivityPub server. That said, I think only Note and Article object types are supported at present, but still kind of cool.

Clogging up the tubes?

Another, more general, thought: Would a proliferation of single-user sites as Fediverse actors have any negative effect on performance across the federated network as a whole? I don’t know enough about how it all works to say one way or another at the moment. I can’t see why it would be any different to single-user pleroma instances, say.Β  But this is WP.Β  Given how easy it is to set up, it definitely warrants checking into in more detail, so as not to have an unexpected ‘great WP Fedi DDOS of 2019’.

Following the Fediverse

Flipping things around, people can now follow my site from the Fediverse, but does it change anything as to how I follow people on the Fediverse? I think really it’s outside of the scope of this plugin, and that you just continue to use your native Fedi apps, and/or subscribe through Microsub given that at minimum Mastodon accounts have h-feeds.

Minor technical issues

For me to look at further and possibly report issues on if needed:

  • responses from the Fediverse show up as authored by ‘Anonymous’, when the user does have a name
  • the avatar for responses received from the Fediverse seems to be wrong – they are showing the avatar of the site owner themselves?
  • threaded replies don’t really work (though they look to be on the roadmap)
  • Hubzilla: although I can follow my site from Hubzilla, I don’t seem to be able to see its posts appearing

Party on!

Pretty happy with this setup. I think I’ll let it simmer for a while and then write some follow up thoughts about how it is all working out.

5 thoughts on “Bridging the IndieWeb and the Fediverse, part 3 – WordPress ActivityPub plugin

Bookmarks

  • Aaron Davis

Mentions

  • Neil Mather
  • Ton Zijlstra

Leave a Reply

Your email address will not be published. Required fields are marked *