A guide to ActivityPub and Webmention in WordPress
Published: â Leave a comment Last update:
ActivityPub and Webmention bring a large part of the fediverse to your WordPress instance. But what are their differences and how to use them? This and more will be part of this article.
First of all: ActivityPub? Webmention? Whatâs that?
ActivityPub is a protocol for decentralized social networks. Itâs built (along with other protocols) to connect multiple servers, also called instances, to connect to each other and build decentralized networks. Webmention is a protocol to interact with content on other websites. However, theyâre also both WordPress plugins (ActivityPub, Webmention) and both useful if you want your WordPress instance to be part of the fediverse (a network of different decentralized social networks).
ActivityPub
I would describe ActivityPub as the main protocol for such a decentralized social network. It lets you create user profiles and allows to send and receive messages. And this is also what the WordPress plugin ActivityPub does: It provides you with one or more profiles (for the blog as a whole and/or for individual authors) and can send blog posts and receive comments.
Plugin configuration
After installing the ActivityPub plugin, which is pretty straight forward and identical to any other WordPress plugin (if you need assistance, there is also an installation guide available), you can access the pluginsâ settings in Settings > ActivityPub. At first, head over to the âSettingsâ tab and decide whether you want to use a blog profile, which publishes all posts, individual profiles for each blog post author or both. Leave the other settings with their default for now or change them to your liking and you hopefully have a successful ActivityPub instance. If enabled, you can manage your blog profile and blog followers from the settings in Settings > ActivityPub > Blog Profile and Settings > ActivityPub > Followers.
If you have author profiles enabled, go to your users list, click the checkbox for all users you want to enable an author profile for, click on the âBulk actionsâ select on top or at the bottom of the list, select the entry âEnable for ActivityPubâ and click on the âApplyâ button. After that, everyone enabled this way has its own profile via the URL of their author URL.
Every author can manage its follower and profile information via Users > Follower and Users > Extra Fields as well as via their profile in the âActivityPubâ section.
The blog profile, if enabled, can be found using the URL of your blog.
Test following via ActivityPub
Now itâs time to test whether ActivityPub is working for you. Itâs the best if you already have a personal account in the fediverse for that, e.g. on Mastodon. There or in your used client, search for the blog URL or an author URL (whichever youâve enabled before) and search for the user with this URL. You should now found your WordPress instance. Try to follow this account. This might take a bit and may only be displayed as a follow request, but it should work. Depending in your settings, you should now also receive an email notification from your WordPress website that you have a new follower. đ
Now donât hesitate and write your first blog post, which then gets automatically published via ActivityPub!
Why is there no post on the profile page despite there should be some?
If youâve already written and published posts via ActivityPub and then check your blog profile via ActivityPub with an account that is not yet following your blog profile, you may notice that, according to the profile information, there are published posts, but you canât see them. Thatâs one major drawback of ActivityPub at the moment: You first start seeing content of a profile after someone on your current instance started following this profile. Otherwise your instance wonât get notified about new published posts of this profile and thus cannot display them.
Webmention
A webmention is a notification that you did something with a content of someone else. This could be an information about a like, an RSVP, a bookmark or even about a read status. With the WordPress plugin, your instance gets notifications about others interacting with your content, which you published. While ActivityPub has basic support for webmentions, it doesnât display them on your posts automatically. While there is a block for the block editor for it (Fediverse Reactions), it still has its inconveniences.
Itâs much easier with the Webmention plugin, which, if installed and activated, can automatically display who has given your content a like or republished it.
Plugin configuration
After installation (which is done identical to installing ActivityPub above), you can find the pluginsâ settings in Settings > Webmention. For now, you can leave all settings at their defaults â or directly change them to your liking. The plugin should work out of the box. However, depending in your used theme there might be some adjustments needed when it comes to the design of webmentions on your blog post pages.
Test a webmention
First, you need something you can interact with. If you didnât already write your first blog post published via ActivityPub, do it now! After it, you should see it with your personal fediverse account (since you followed your blog) and itâs time to interact with it: so like it, repost it, do something with it your client/UI enables you to do.
Shortly after, you should also see this action on this blog post on your website after the comments section. If not, check your comment moderation. If you enabled moderated comments, these actions also need to be moderated. After moderation you should now see your action, e.g. a like on your post.
If it still doesnât work, check if youâve enabled pingbacks and trackbacks for your blog post. These are currently defined as necessary for the Webmention plugin to be active.
Bonus: Avatar Privacy
Since webmentions look much better with an avatar, enable avatars in Settings > Discussions as well as Settings > Webmention > Avatars. Since, by default, avatars from the fediverse will now load from the instance the account that interacted with your content is part of, thereâs a potential data protection violation, at least if the GDPR applies to you. So use Avatar Privacy and be save! Just install it and youâre basically ready. New fediverse interactions will now have their avatars being downloaded onto your webspace and being provided via a URL from your site for improved privacy.
Additionally at this point a full recommendation for using the Webmention plugin to display reactions, as itâs automatically supported by Avatar Privacy, whereas the blocks of the ActivityPub plugin currently still load avatars from the respective external servers.
Reposts