Your WordPress blog as a Mastodon instance (fediverse)

Intro

The ActivityPub plugin was developed by Mattias Pfefferle but was purchased by Automattic. Please see the FAQ, within the plugin page, for the current feature set. The development of version 1.0 was led by Mattias Pfefferle, already within Automattic. Version 1.0 contains optimizations at the operating level and includes two blocks: one, which allows you to display the option to follow your blog on the blog. And another to explore the list of your blog followers. You can see both in action on the Blogpocket page Feed de Mastodon.

Converting a WordPress installation into an instance of the fediverse means, in practice, that the URLs of the author profile and the blog profile of that one 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 must install and activate the plugin ActivityPub from Automattic. 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. Version 1.0 also allows federation of the entire blog profile.

In the event that one of the blog posts is responded to on the blog (e.g. on Mastodon), that interaction will be seen on the blog as a comment.

Installing the ActivityPub plugin

The plugin to convert a WordPress installation into an instance of fediverse is called ActivityPub para 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 dashboard.
  2. Go toPlugins > Add New and search for “ActivityPub” (by Mattias Pfefferle)
  3. Install the Automattic “ActivityPub” plugin.
  4. Once everything has finished installing, go to the Plugins section of your blog and activate the ActivityPub plugin.

If everything has gone well, your blog should now be some kind of Fediverse instance. It won’t look any different, but behind the scenes your blog will now have your own Fediverse address . People can paste that address into the search box on Mastodon and other Facebook platforms, and your blog will appear as a profile they can follow and interact with.

Fountain: Fedi.tips

The WordPress user on your blog will also have become a user on the instance (your blog’s author page). Both the user and the URL of the author page can be followed in Mastodon as if they were users or URLs of federation instances.

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

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

  • My username, in Mastodon, is: @acambronero@federate.blogocket.com. The URL address corresponding to my user is: https://federate.blogpocket.com/@acambronero

Federate.blogpocket.com is my own Mastodon instance, hosted on Masto.host. Typically, users create their account on a third-party instance, but in any case, you can switch to another instance at any time and even export and import your data (not the posts).

Users on 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 sectionUsers from 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.

Both the author profile and the blog profile of Blogpocket can be followed on Mastodon by searching for the following username or its corresponding URL:

Author profile:

  • The username is @acambronero
  • The URL is https://www.blogpocket.com/author/antonio

Blog profile:

  • The username is @blogpocket
  • The URL is https://www.blogpocket.com/@blogpocket

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

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

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 show the entire post, part of it, or just a link. If you set it to show the entire post, people who follow you on Mastodon will see it as an extremely long post, so be careful if you choose this option (source: Fede.tips)

Blocks

There are two blocks related to blog followers in the fediverse.

Follow me on the fediverse block

With this block, you can add a tracking mechanism to your blog. Your name and the fediverse username will appear, along with a “Follow” button. See how it works below (click the “Follow” button):

In the block configuration options, you must choose the author profile or the blog profile. Remember that the definition of the author profile is by default and that of the blog you would have to activate it in the settings section of the plugin.

Followers block in the fediverse (Fediverse Followers)

With this block, you can explore your followers on the fediverse. To do this, you must choose the author or blog profile in the block configuration. Is that how it works:

Followers

Remember that you also have a list of your followers in the Users > Followers option, within your WordPress administration panel.

Version 1.0 bug

In version 1.0, if the blog has a single author and if the blog author is disabled, the widget corresponding to the “Follow me on Facebook” block will only show the default doll “hello dolly”. Blog updates will also not be published on the fediverse.

More details about this bug: https://github.com/Automattic/wordpress-activitypub/issues/440

An idea to include the URL of your WordPress converted into a fediverse instance in your Mastodon profile

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

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

That would allow it to be highlighted, 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 the Mastodon profile: How to verify your WordPress site on Mastodon.

Posible problems

Once the plugin is installed, check the site health section for possible errors.

In my tests I detected the following errors:

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

You should therefore check possible incompatibilities with other plugins and even with your active theme. Ideally, you would probably try it on an empty WordPress installation, with just the security plugin.

And speaking of security, I also spoke with Matthias Pfefferle about a possible security risk, since 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 launch a brute force attack, but there are other methods to harden WordPress login, such as two-factor authentication or limiting login attempts. In the end, this is how almost all platforms work, like Twitter, Mastodon,…. The username is always known.

Matthias Pfefferle

Comparte en Mastodon

Icono de Mastodon


Posted

in

by

Comments

One response to “Your WordPress blog as a Mastodon instance (fediverse)”

Leave a Reply

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

Información básica sobre protección de datos Ver más

  • Responsable: Antonio Cambronero.
  • Finalidad:  Moderar los comentarios.
  • Legitimación:  Por consentimiento del interesado.
  • Destinatarios y encargados de tratamiento: No se ceden o comunican datos a terceros para prestar este servicio. El Titular ha contratado los servicios de alojamiento web a GreenGeeks que actúa como encargado de tratamiento.
  • Derechos: Acceder, rectificar y suprimir los datos.
  • Información Adicional: Puede consultar la información detallada en la Política de Privacidad.

This site uses Akismet to reduce spam. Learn how your comment data is processed.