Your WordPress blog as an instance of Mastodon (fediverse)

Antonio Cambronero
6 min readNov 22, 2022

--

In this post you will learn how to convert your WordPress blog as an instance of Mastodon (fediverse). For example, you will be able to follow the WordPress blog from your Mastodon account.

Warning: The ActivityPub plugin, by Mattias Pfefferle, is a BETA version. Check the FAQ, within the plugin page, to see the current feature set or rather what is still planned. Some of the questions raised in this article are just ideas, though they have all been tested in the Blogpocket lab. In Blogpocket, both Mastodon and the fediverse are subjects under exploration.

What is the fediverse

The fediverse is a collection of independent, decentralized and open source social platforms that communicate with each other using open protocols. This means that the millions of users of these tools, spread over thousands of servers, can interact with each other as if they were on a single social tool.

Which social platforms make up the fediverse

Mastodon, is the best known for being the destination of thousands of users, coming from Twitter, after the latest events caused by its new owner. But there are many others:

  • BookWyrm: A social reading platform, an alternative to Amazon’s GoodReads.
  • Friendica: A Facebook-style interface and plugins like calendars, a little trickier to use because it offers a lot of options and long posts with no character limit.
  • Funkwhale: Storage and sharing of music and podcasts.
  • Mobilizon: Organization of events, Fedi’s alternative to Facebook Events.
  • OwnCast– Live video streaming with a chat window on the side, very Twitch-esque.
  • PeerTube– YouTube-style video sharing site that uses P2P technology to allow even small servers to make videos go viral, since the more people watch a video, the more bandwidth it gets.
  • PixelFed: Photo-sharing site, similar in style to Instagram and Tumblr.
  • WriteFreely ? — Minimalist blog where the focus is on the text, like a calmer version of Medium.

Source: Fedi.tips

What is Mastodon

Mastodon is a kind of social network, which reminds us from afar of Twitter. But, as José Luis Orihuela, «Mastodon is not A social network. Mastodon is not like Twitter. Mastodon does not want to be like Twitter.» Here you can read the magnificent introduction by José Luis Orihuela: It’s not a bug, it’s a mastodon.

I also invite you to watch this presentation and the conversation with José Luis Orihuela, broadcast live on 11/18/22:

From now on, you will find more tutorials on Mastodon on Blogpocket, but here I want to focus on turning WordPress into an instance of the fediverse.

What it means to convert WordPress into a fediverse instance

Converting a WordPress installation into a fediverse instance means that your users can be followed by any Mastodon profile. And, therefore, the entries published in said WordPress, within the blog, will appear in the timeline of followed accounts, in Mastodon, of all those profiles that have followed it.

To do this, you have to install and activate the ActivityPub by Mattias Pfefferle. This plugin implements the ActivityPub protocol for your blog. Your readers will be able to follow and interact with your blog posts on Mastodon and other federated platforms supported by ActivityPub.

Installing the ActivityPub Plugin

The plugin for converting a WordPress installation into a fediverse instance is called ActivityPub for WordPress and is named after the technical protocol that the Fediverse servers use to communicate. Here’s how to install it:

  1. Log in to your WordPress blog’s control panel.
  2. Go to Plugins > Add New and search for “ActivityPub” (by Mattias Pfefferle)
  3. Install the “ActivityPub” plugin by Mattias Pfefferle.
  4. You may also need to install Pfefferle’s “WebFinger” plugin to help the ActivityPub plugin work properly.
  5. Once everything has finished installing, go to the Plugins section of your blog and activate the ActivityPub plugin.
  6. If all went well, your blog should now be a kind of instance of the Fediverse. It won’t look any different, but behind the scenes your blog will now have its own Fediverse address . People can paste that address into the search box on Mastodon and other fediverse platforms, and your blog will appear as a profile they can follow and interact with.

Source: Fedi.tips

What is the username and URL of your WordPress instance, visible to the fediverse

In Mastodon’s search box, you can try to find both usernames and URLs or web addresses corresponding to those users and even tags. All of this can be followed.

  • My Mastodon username is: @blogpocket@federate.social
  • The URL for my username is: https://federate.social/@blogpocket

Federate.social is the Mastodon instance I chose to initially participate in this platform. But any user can switch to another instance at any time.

Users from different instances can communicate with each other, unless the instance you belong to is locked.

Once the ActivityPub plugin is installed, you can find out the address of your blog by going to the Users of the WordPress dashboard and clicking on the user who writes the blog. Scroll down to the bottom of your profile options page and your fediverse username will appear there. Provide that username to anyone who wants to follow that user’s blog on Mastodon or the rest of the Fediverse.

The Blogpocket blog can be followed on Mastodon by searching for the following username or its corresponding URL:

Note the similarity in the format of the user in the WordPress instance (@acambronero@www.blogpocket.com) and the user of the federate.social instance in Mastodon (@blogpocket@federate.social). From there, you see how www.blogpocket.com (blog domain) is instantiated in a similar way to federate.social.

However, for the URL, the address of the blog’s author file (https://www.blogpocket.com/author/antonio) is taken.

When the plugin is installed, you will also see an ActivityPub option appear in the settings menu of your WordPress dashboard. This will allow you to adjust how the plugin works. You can set it to display the entire post, a part of it, or just a link. If you set it to show the full post, people who follow you on Mastodon will see it as one extremely long post, so be careful if you choose this option (source: Fede.tips)

I had an idea, which I don’t even know if it’s good (but I think it is! ) so that Mastodon users know that they can follow your blog as if it were another user of the fediverse.

The idea is to include the URL, of your WordPress instance, within your profile in one of the four available links.

That would allow it to be featured, verified, and your potential followers could copy and paste the URL into the search box.

Here is a link to learn how to verify a link, which you own, on Mastodon’s profile: How to verify your WordPress site on Mastodon.

Possible problems

Once the plugin is installed, check the health section of the site in case possible errors appear.

In my tests I detected the following errors:

  • The Yoast SEO plugin had the blog author file disabled and had to be enabled.
  • Had to regenerate permalinks in WordPress settings.
  • Had to exclude author file url in cache plugin.

The plugin is still in its early stages and I received a lot of feedback in the last few days. I am currently working on a better embedding. On the other hand, it is still a complex protocol and there is a high chance that something will break. There are so many plugins, hosters, web servers, … that can cause problems

Matthias Pfefferle

You should therefore check possible incompatibilities with other plugins and even with your active theme. The ideal would probably be to test it on an empty WordPress installation, with only the security plugin.

And speaking of security, I also spoke to Matthias Pfefferle about a potential security risk, as the instance username is formed from the WordPress username. If it has an administrator profile, that could favor brute force attacks, for example.

I wouldn’t say it’s a risk per se. Sure it makes it easier to initiate a brute force attack, but there are other methods to harden your WordPress login, such as two-factor authentication or limiting login attempts. In the end, this is how almost all platforms work, such as Twitter, Mastodon, …. The username is always known.

Matthias Pfefferle

Related

Conclusions

Here, we have made an introduction to Mastodon and the fediverse. And, above all, you have learned how to convert a WordPress installation into a fediverse instance so that, for example, it can be followed in any instance of Mastodon by any of its users.

--

--

Antonio Cambronero

Computer scientist and WordPress specialist. Defender of #minimalism and #slowblogging. Addicted to #productivity. Living life with intention and purpose.