You would think just enabling ActivityPub would be a matter of installing the AcivityPub plugin, turning it on, and you’er good! Right?
Yeah, well, things are never quite that easy. This blog is currently hosted on a DreamHost VPS (because I finally gave up hosting everything on my 2009 Mac Mini as it fell way out of support and leaving that open on the ‘net seemed… unwise) with WordPress now (RIP whatever the hell I was using back in 2005. Something SixApart-ish? I think?) and it should be just a matter of installing the plugin, turning it on, and it’s good!
Things are never that easy.
First problem, the plugin requires that the host username is the exposed username for per-user feeds. When you set up wordpress at DreamHost it chooses a somewhat… random name, which is generally a good idea (I’ve watched my logs in the past where penetration attempts just cycle through lists of common first and last names trying to get access to stuff) but annoying in this case. Moreso because you can’t change your username once it’s set up, and while there’s not too much on the blog there’s certainly more than I want to re-post or lose.
The fix there is, because this is a just-me blog, turn on a single global-blog-wide feed rather than per-user feed. Go to the settings tab on the ActivityPub setting screen (they’re meta-settings, I guess) and tick the “Enable blog” profile checkbox and give your blog the username you should have given yourself but didn’t. So that’s nice.
Handy protip from this — if you have multiple users on a blog and want them to have sane account names for syndication, give ’em sane usernames to start.
Second problem is that search didn’t work and when I tried looking for it on my home instance (yay, https://weatherishappening.network for all your slightly surreal Providence and environs weather forecasts and reminders to repent to your weather lords) because this requires WebFinger setup. I installed the web finger plugin (which is noted to not be tested with the version of WordPress I’m using but whatever) but that didn’t work because DreamHost does… things, and stuff, with .well-known, which is annoying. As a result there wasn’t an entry in my top level .well-known directory for web finger.
The solution there is to add a rewrite rule to the top-level .htaccess file for the site. Courtesy of this bug update I added:
RewriteRule ^.well-known/(host-meta|webfinger|nodeinfo|x-nodeinfo) /blog/.well-known/$1 [L]
(yes, including the [L] at the end for reasons I don’t know) to my .htaccess file and that made things work.Yay! Searchable, and subscribable, and all that. Dunno if comments work (I guess I’ll find out soon) but there’s a feed and that’s excellent. I assume that if your blog has a root that isn’t /blog (mine is, so that’s nice) you’d want to update that. It’s also possible that you don’t need to do this at all if WordPress controls your entire site from / on down.
So, in summary, for DreamHost VPS-hosted WordPress blogs:
1) Install ActivityPub and WebFinger plugins
2) Turn on a full-blog feed
3) Edit your top-level .htaccess file to redirect web finger (and some other stuff) to your blog’s root directory .well-known directory
Hopefully this’ll help someone else who might be poking at things and wondering WTF exactly isn’t working.