ActivityPub

Beschreibung

Steig mit ActivityPub ins Fediverse ein und erreiche mit deinem Blog ein größeres Publikum. Gewinne Follower, verteile Updates und sammle Kommentare aus der diversen Nutzerschaft von ActivityPub-kompatiblen Plattformen.

Mit installiertem ActivityPub-Plugin funktioniert dein WordPress-Blog selbst als föderiertes Profil, dazu kommen Profile für jeden Autor. Wenn deine Website beispielsweise example.com ist, dann findet man das blogweite Profil unter @example.com@example.com. Autoren wie Jane und Bob wiederum hätten ihre individuellen Profile jeweils unter @jane@example.com und @bobz@example.com.

Ein Beispiel: Ich gebe dir meinen Mastodon-Profilnamen @pfefferle@mastodon.social. Du suchst danach, findest mein Profil und klickst auf „Folgen“. Jetzt erscheint jeder Beitrag von mir auf deiner Startseite. Auf die gleiche Weise kannst du mit dem ActivityPub-Plugin Janes Profil bei @jane@example.com finden und folgen.

Sobald du Janes Profil @jane@example.com folgst, landet jeder Beitrag, den sie auf example.com erstellt, auf deiner Startseite. Und wenn du dem blogweiten Profil @example.com@example.com folgst, erhältst du Updates von allen Autoren.

Hinweis: Wenn deinem Autor oder deiner Blog-Instanz niemand folgt, bleiben deine Beiträge unsichtbar. Ob das Plugin funktioniert, findest du am leichtesten heraus, indem du deinem eigenen Profil folgst. Wenn du bereits ein Mastodon-Profil besitzt, beginne, indem du deinem neuen folgst.

Das Plugin funktioniert mit den folgenden getesteten föderierten Plattformen, es könnte aber noch mehr geben, mit denen es ebenfalls klappt:

Einige Dinge solltest du beachten:

  1. Das blogweite Profil funktioniert nur für Websites mit aktivierten Rewrite Rules. Wenn deine Website Rewrite Rules nicht aktiviert hat, könnten die autorenspezifischen Profile trotzdem funktionieren.
  2. Viele Einzelautoren-Blogs haben ihre Autoren-Profilseiten deaktiviert oder über ein SEO-Plugin wie Yoast oder Rank Math umgeleitet. Das geschieht normalerweise, um Duplicate Content mit der Homepage des Blogs zu vermeiden. Wenn deine Autorenseite auf diese Weise deaktiviert wurde, dann funktionieren die Autorenprofile von ActivityPub bei dir nicht. Stattdessen kannst du die Autorenprofilseite wieder einschalten und im SEO-Plugin die Option wählen, die Autorenseite nicht zu indexieren. Das löst Duplicate-Content-Probleme mit Suchmaschinen und ermöglicht, dass die Autorenprofile von ActivityPub funktionieren.
  3. Sobald ActivityPub installiert ist, sind nur ab dann neu veröffentlichte Beiträge im Fediverse verfügbar. Und auch wenn du ActivityPub schon länger benutzt, sieht, wer dir folgt, nur neue Beiträge, die du von diesem Zeitpunkt an publizierst. Früher geschriebene Beiträge sieht er niemals in seinem Home Feed. Das funktioniert ganz ähnlich wie beim Abonnieren eines Newsletters. Wenn du einen Newsletter bestellst, bekommst du nur künftige E-Mails, aber nicht die alten archivierten. Folgt jemand deiner Website mit ActivityPub, so empfängt er nur die neuen Beiträge, die du ab dann veröffentlichst.

Wie also läuft das ab?

  1. Installiere das ActivityPub-Plugin.
  2. Geh zu den Einstellungen des Plugins und passe diese nach Belieben an. Wenn du fertig bist, klicke auf den Speichern-Button.
  3. Stelle sicher, dass die Autoren-Profilseite deines Blogs aktiv ist, wenn du Autoren-Profile verwendest.
  4. Besuche Mastodon oder jede andere föderierte Plattform, suche nach deinem Profil und folge diesem. Dein neues Profil sieht entweder aus wie @your_username@example.com oder wie @example.com@example.com, danach solltest du also suchen.
  5. Veröffentliche einen neuen Beitrag in deinem Blog.
  6. Prüfe in Mastodon, ob der neue Beitrag auf deiner Startseite erscheint.

Hinweis: Es kann bis zu rund 15 Minuten dauern, bis der neue Beitrag in deinem föderierten Feed erscheint. Das liegt daran, dass die Nachrichten über einen verzögerten cron an die föderierten Plattformen gesendet werden. Das soll verhindern, dass das Veröffentlichen für Benutzer mit einer Menge Follower unterbrochen wird. Es ist also kein Grund zur Sorge, wenn er nicht unmittelbar auftaucht. Lass ihm etwas Zeit. In den meisten Fällen wird er binnen weniger Minuten erscheinen. Dann weißt du, dass alles wie erwartet funktioniert.

Screenshots

  • Der Block „Folge mir“ im Block-Editor
  • Der Block „Follower“ im Block-Editor
  • Der Block „Föderierte Antwort“ im Block-Editor
  • Eine „föderierte Antwort“ in einem Beitrag
  • Ein Blog-Profil bei Mastodon

Blöcke

Dieses Plugin unterstützt 4 Blöcke.

  • Federated Reply Respond to posts, notes, videos, and other content on the fediverse. Ensure the URL originates from a federated social network like Mastodon, as other URLs might not function as expected.
  • Follow me on the Fediverse Display your Fediverse profile so that visitors can follow you.
  • Fediverse Reactions Display Fediverse likes and reposts
  • Fediverse Followers Display your followers from the Fediverse on your website.

Installation

Folge den normalen Anweisungen für die WordPress-Plugin-Installation.

Automatische Plugin-Installation

So fügst du ein WordPress-Plug-in mit dem integrierten Plugin-Installer hinzu:

  1. Gehe zu Plugins > Installieren.
  2. Gib „activitypub“ in die Box Suche Plugins ein.
  3. Suche das WordPress-Plugin, das installiert werden soll.
    1. Klicke auf Details für weitere Informationen zum Plugin und Anleitungen, die du für die Einrichtung des Plugins vielleicht drucken oder speichern möchtest.
    2. Um das WordPress-Plugin zu installieren, klicke auf Jetzt installieren.
  4. Der resultierende Installationsbildschirm zeigt die Installation als erfolgreich an oder weist auf Probleme während der Installation hin.
  5. Falls erfolgreich, klicke Plugin aktivieren, um es zu aktivieren, oder Zum Plugin-Installer zurückkehren für weitere Aktionen.

Manuelle Plugin-Installation

Es gibt einige wenige Fälle, in denen die manuelle Installation eines WordPress-Plugins angebracht ist.

  • Wenn du den Speicherort und den Installationsprozess eines WordPress-Plugins kontrollieren möchtest.
  • Falls dein Server keine automatische Installation eines WordPress-Plugins erlaubt.
  • Wenn du die neueste Entwicklungsversion ausprobieren möchtest.

Die manuelle Installation eines WordPress-Plugins setzt FTP-Kenntnisse sowie das Bewusstsein voraus, dass du deine Website aufs Spiel setzen könntest, wenn du ein WordPress-Plugin installierst, dass mit der aktuellen Version nicht kompatibel ist oder aus einer unzuverlässigen Quelle stammt.

Sichere deine Website komplett, bevor du weitermachst.

Um ein WordPress-Plugin von Hand zu installieren:

  • Download your WordPress Plugin to your desktop.
  • Falls du es als Zip-Archiv herunterlagen hast, entpacke den Plugin-Ordner auf deinem Desktop.
  • Lade den Plugin-Ordner mit deinem FTP-Programm in den Ordner wp-content/plugins in deinem WordPress-Verzeichnis hoch.
  • Geh zum Plugins-Bildschirm und such das neu hochgeladene Plugin in der Liste.
  • Klicke Aktivieren, um es zu aktivieren.

FAQ

tl;dr

Dieses Plugin verbindet dein WordPress-Blog mit beliebten sozialen Plattformen wie Mastodon und macht es damit einem größeren Publikum zugänglich. Einmal installiert, können dir Benutzer auf diesen Plattformen folgen, wodurch deine neuen Beiträge in ihren Feeds erscheinen.

Was ist „ActivityPub für WordPress“

ActivityPub for WordPress erweitert WordPress um einige Fediverse-Funktionen, konkurriert aber nicht mit Plattformen wie Friendica oder Mastodon. Wenn du ein dezentrales Social Network betreiben möchtest, verwende bitte Mastodon oder GNU social.

Was, wenn dein Blog in einem Unterverzeichnis deines Webservers liegt?

Damit webfinger funktioniert, muss es auf das Stammverzeichnis der URL abgebildet werden, auf der sich Dein Blog befindet.

Apache

Füge folgendes zur .htaccess-Datei im Hauptverzeichnis hinzu:

RedirectMatch "^\/\.well-known/(webfinger|nodeinfo)(.*)$" /blog/.well-known/$1$2

Wobei ‚blog‘ der Pfad zu dem Unterverzeichnis ist, in dem sich Dein Blog befindet.

Nginx

Füge der site.conf in sites-available Folgendes hinzu:

location ~* /.well-known {
    allow all;
    try_files $uri $uri/ /blog/?$args;
}

Wobei ‚blog‘ der Pfad zu dem Unterverzeichnis ist, in dem sich Dein Blog befindet.

Wenn du dein Blog in einem Unterverzeichnis betreibst, aber eine andere wp_siteurl hast, dann brauchst du den Redirect nicht, weil sich die index.php darum kümmert.

Was ist, wenn du dein Blog hinter einem Reverse Proxy mit Apache betreibst?

Wenn du einen Reverse Proxy mit Apache nutzt, um deinen Host zu betreiben, kann es dir passieren, dass deinem Blog keine Follower beitreten können. Das liegt daran, dass das Proxy-System die Host-Header auf den internen DNS-Namen deines Servers umschreibt, den das Plugin wiederum verwendet, um die Antworten zu signieren. Die entfernte Website, die deinen Benutzern zu folgen versucht, erwartet den öffentlichen DNS-Namen in den Antworten. In diesen Fällen musste du die Anweisung ‚ProxyPreserveHost On‘ nutzen, um sicherzustellen, dass der externen Host-Name an deinen internen Host durchgereicht wird.

Wenn du SSl zwischen dem Proxy und dem internen Host nutzt, brauchst du vielleicht auch SSLProxyCheckPeerName off, wenn dein interner Host nicht mit dem korrekten SSL-Namen antworten kann. In einigen Umgebungen könnte das ein Sicherheitsproblem darstellen.

Konstanten

Das Plugin verwendet PHP-Konstanten, um sein Standardverhalten ein- und auszuschalten oder zu ändern. Benutze diese bitte vorsichtig und nur, wenn du weißt, was du tust.

  • ACTIVITYPUB_REST_NAMESPACE – Standard-Namensraum des REST-Endpunkts ändern. Standard: activitypub/1.0.
  • ACTIVITYPUB_EXCERPT_LENGTH – Länge des Textauszugs ändern. Standard: 400.
  • ACTIVITYPUB_SHOW_PLUGIN_RECOMMENDATIONS – Plugin-Empfehlungen in den ActivityPub-Einstellungen anzeigen. Standard: true.
  • ACTIVITYPUB_MAX_IMAGE_ATTACHMENTS – Anzahl zu föderierender Anhänge ändern. Standard: 3.
  • ACTIVITYPUB_HASHTAGS_REGEXP – Standard-Regex zur Erkennung von Hashtext in Text ändern. Standard: (?:(?<=\s)|(?<=<p>)|(?<=<br>)|^)#([A-Za-z0-9_]+)(?:(?=\s|[[:punct:]]|$)).
  • ACTIVITYPUB_USERNAME_REGEXP – Standard-Regex zur Erkennung von @-Replies in Text ändern. Standard: (?:([A-Za-z0-9\._-]+)@((?:[A-Za-z0-9_-]+\.)+[A-Za-z]+)).
  • ACTIVITYPUB_URL_REGEXP – Standard-Regex zum Erkennen von URLs in einem Text geändert. Standard: (www.|http:|https:)+[^\s]+[\w\/].
  • ACTIVITYPUB_CUSTOM_POST_CONTENT – Standard-Template für Activities ändern. Standard: <strong>[ap_title]</strong>\n\n[ap_content]\n\n[ap_hashtags]\n\n[ap_shortlink].
  • ACTIVITYPUB_AUTHORIZED_FETCH – AUTHORIZED_FETCH aktivieren.
  • ACTIVITYPUB_DISABLE_REWRITES – Automatisches Anlegen von mod_rewrite-Regeln deaktiveren. Standard: false.
  • ACTIVITYPUB_DISABLE_INCOMING_INTERACTIONS – Eingehende Antworten/Kommentare/Likes blockieren. Standard: false.
  • ACTIVITYPUB_DISABLE_OUTGOING_INTERACTIONS – Ausgehende Antworten/Kommentare/Likes deaktivieren. Standard: false.
  • ACTIVITYPUB_SHARED_INBOX_FEATURE – Gemeinsame Inbox aktivieren. Standard: false.
  • ACTIVITYPUB_SEND_VARY_HEADER – Aktivieren, um den Header Vary: Accept zu senden. Standard: false.

Wo kannst du deine Follower verwalten?

Wenn du den Blog-Benutzer aktiviert hast, findest du die Liste seiner Follower in den Einstellungen unter /wp-admin/options-general.php?page=activitypub&tab=followers.

Die Follower eines Benutzers finden sich im Menü unter „Benutzer“ -> „Follower“ oder unter wp-admin/users.php?page=activitypub-followers-list.

Aus Datenschutzgründen ist es nicht möglich, die Follower anderer Benutzer zu sehen.

Rezensionen

21. Februar 2025 1 Antwort
I’ve been using the add-on for a few months. I’m really happy. I’ve gotten a lot more readers to my site and real comments from people compared to the previous state. It’s also been nice to see that the add-on is being developed all the time. I was so excited that I started translating the add-on into Finnish, so I can also contribute to this great add-on. Thank you!
15. Dezember 2024
Not just an auto-poster – it it turns your WordPress blog into its own instance like a Mastodon server, so people can follow and reply to your blog directly from their Mastodon/GoToSocial/whatever account. Images are attached to the Fediverse view, and remote replies show up locally as comments. People can boost your post directly instead of just linking to it. And they’re still adding more capabilities with each release. Note that a lot of the settings aren’t in the plugin config page, they’re put in the relevant categories. Followers show up on your user profile. You ban an instance by putting it in the general comments blocklist. Works well with ClassicPress too.
20. September 2024
The plugin works as described, providing a full ActivityPub integration from the moment you activate it. There are a lot of options, some of which require a bit of extra research to understand (I recommend watching the Fediverse Files series on YouTube), but the defaults are solid and in most situations you won’t want to change them.
17. Juli 2024
There isn’t rating scale that I would like to leave here – Max isn’t enough. A wise man’s words are worth their weight in gold. The plugin is designed for all platforms using the ActivityPub protocol, but maybe one day there will be a feature that will allow me to create a comment (toot) in Mastodon from a form on my blog page when WordPress local commenting system is disabled 🙂
Alle 32 Rezensionen lesen

Mitwirkende & Entwickler

„ActivityPub“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„ActivityPub“ wurde in 26 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „ActivityPub“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

5.5.0 – 2025-03-19

Added

  • Added „Enable Mastodon Apps“ and „Event Bridge for ActivityPub“ to the recommended plugins section.
  • Added Constants to the Site-Health debug informations.
  • Development environment: add Changelogger tool to environment dependencies.
  • Development environment: allow contributors to specify a changelog entry directly from their Pull Request description.
  • Documentation for migrating from a Mastodon instance to WordPress.
  • Support for sending Activities to ActivityPub Relays, to improve discoverability of public content.

Changed

  • Documentation: expand Pull Request process docs, and mention the new changelog process as well as the updated release process.
  • Don’t redirect @-name URLs to trailing slashed versions
  • Improved and simplified Query code.
  • Improved readability for actor mode setting.
  • Improved title case for NodeInfo settings.
  • Introduced utility function to determine actor type based on user ID.
  • Outbox items only get sent to followers when there are any.
  • Restricted modifications to settings if they are predefined as constants.
  • The Welcome page now uses WordPress’s Settings API and the classic design of the WP Admin.
  • Uses two-digit version numbers in Outbox and NodeInfo responses.

Removed

  • Our version of sanitize_url() was unused—use Core’s sanitize_url() instead.

Fixed

  • Ensured that Query::get_object_id() returns an ID instead of an Object.
  • Fix a fatal error in the Preview when a post contains no (hash)tags.
  • Fixed an issue with the Content Carousel and Blog Posts block: https://github.com/Automattic/wp-calypso/issues/101220
  • Fixed default value for activitypub_authorized_fetch option.
  • Follow-Me blocks now show the correct avatar on attachment pages.
  • Images with the correct aspect ratio no longer get sent through the crop step again.
  • No more PHP warnings when a header image gets cropped.
  • PHP warnings when trying to process empty tags or image blocks without ID attributes.
  • Properly re-added support for Update and Delete Announcements.
  • Updates to certain user meta fields did not trigger an Update activity.
  • When viewing Reply Contexts, we’ll now attribute the post to the blog user when the post author is disabled.

5.4.1 – 2025-03-04

Fixed

  • Fixed transition handling of posts to ensure that Create and Update activities are properly processed.
  • Show „full content“ preview even if post is in still in draft mode.

5.4.0 – 2025-03-03

Added

  • Upgrade script to fix Follower json representations with unescaped backslashes.
  • Centralized place for sanitization functions.

Changed

  • Bumped minimum required WordPress version to 6.4.
  • Use a later hook for Posts to get published to the Outbox, to get sure all post_metas and taxonomys are set stored properly.
  • Use webfinger as author email for comments from the Fediverse.
  • Remove the special handling of comments from Enable Mastodon Apps.

Fixed

  • Do not redirect /@username URLs to the API any more, to improve AUTHORIZED_FETCH handling.

5.3.2 – 2025-02-27

Fixed

  • Remove activitypub_reply_block filter after Activity-JSON is rendered, to not affect the HTML representation.
  • Remove render_block_core/embed filter after Activity-JSON is rendered, to not affect the HTML representation.

5.3.1 – 2025-02-26

Fixed

  • Blog profile settings can be saved again without errors.
  • Followers with backslashes in their descriptions no longer break their actor representation.

5.3.0 – 2025-02-25

Added

  • A fallback Note for Article objects to improve previews on services that don’t support Articles yet.
  • A reply context for Posts and Comments to allow relying parties to discover the whole conversation of a thread.
  • Setting to adjust the number of days Outbox items are kept before being purged.
  • Failed Follower notifications for Outbox items now get retried for two more times.
  • Undo API for Outbox items.
  • Metadata to New Follower E-Mail.
  • Allow Activities on URLs instead of requiring Activity-Objects. This is useful especially for sending Announces and Likes.
  • Outbox Activity IDs can now be resolved when the ActivityPub `Accept header is used.
  • Support for incoming Move activities and ensure that followed persons are updated accordingly.
  • Labels to add context to visibility settings in the block editor.
  • WP CLI command to reschedule Outbox-Activities.

Changed

  • Outbox now precesses the first batch of followers right away to avoid delays in processing new Activities.
  • Post bulk edits no longer create Outbox items, unless author or post status change.
  • Properly process Update activities on profiles and ensure all properties of a followed person are updated accordingly.
  • Outbox processing accounts for shared inboxes again.
  • Improved check for ?activitypub query-var.
  • Rewrite rules: be more specific in author rewrite rules to avoid conflicts on sites that use the „@author“ pattern in their permalinks.
  • Deprecate the activitypub_post_locale filter in favor of the activitypub_locale filter.

Fixed

  • The Outbox purging routine no longer is limited to deleting 5 items at a time.
  • Ellipses now display correctly in notification emails for Likes and Reposts.
  • Send Update-Activity when „Actor-Mode“ is changed.
  • Added delay to Announce Activity from the Blog-Actor, to not have race conditions.
  • Actor validation in several REST API endpoints.
  • Bring back the activitypub_post_locale filter to allow overriding the post’s locale.

5.2.0 – 2025-02-13

Added

  • Batch Outbox-Processing.
  • Outbox processed events get logged in Stream and show any errors returned from inboxes.
  • Outbox items older than 6 months will be purged to avoid performance issues.
  • REST API endpoints for likes and shares.

Changed

  • Increased probability of Outbox items being processed with the correct author.
  • Enabled querying of Outbox posts through the REST API to improve troubleshooting and debugging.
  • Updated terminology to be client-neutral in the Federated Reply block.

Fixed

  • Fixed an issue where the outbox could not send object types other than Base_Object (introduced in 5.0.0).
  • Enforce 200 status header for valid ActivityPub requests.
  • object_id_to_comment returns a commment now, even if there are more than one matching comment in the DB.
  • Integration of content-visibility setup in the block editor.
  • Update CLI commands to the new scheduler refactorings.
  • Do not add an audience to the Actor-Profiles.
  • Activity::set_object falsely overwrites the Activity-ID with a default.

5.1.0 – 2025-02-06

Added

  • Cleanup of option values when the plugin is uninstalled.
  • Third-party plugins can filter settings tabs to add their own settings pages for ActivityPub.
  • Show ActivityPub preview in row actions when Block Editor is enabled but not used for the post type.

Changed

  • Manually granting activitypub cap no longer requires the receiving user to have publish_post.
  • Allow omitting replies in ActivityPub representations instead of setting them as empty.
  • Allow Base Transformer to handle WP_Term objects for transformation.
  • Improved Query extensibility for third party plugins.

Fixed

  • Negotiation of ActivityPub requests for custom post types when queried by the ActivityPub ID.
  • Avoid PHP warnings when using Debug mode and when the actor is not set.
  • No longer creates Outbox items when importing content/users.
  • Fix NodeInfo 2.0 URL to be HTTP instead of HTTPS.

5.0.0 – 2025-02-03

Changed

  • Improved content negotiation and AUTHORIZED_FETCH support for third-party plugins.
  • Moved password check to is_post_disabled function.

Fixed

  • Handle deletes from remote servers that leave behind an accessible Tombstone object.
  • No longer parses tags for post types that don’t support Activitypub.
  • rel attribute will now contain no more than one „me“ value.

See full Changelog on GitHub.