How to move a wordpress multisite to a new “folder”

Moving a wordpress multisite (a SINGLE site, not an entire install) to a new subfolder (not really a folder as it’s virtual, but whatever) is not hard, but it’s also not as easy as it should be. Here are the steps I took:

  1. Change the site path from the Network Admin backend, and be sure to have it update “siteurl” and “home”. Make a note of the siteid while you’re here, which you can deduce from the “id=” parameter in the URL.
  2. Regenerate the permalinks from the “Settings -> Permalinks” menu – I just temporarily switch the permalink structure to something else and right back again to the original settings – there’s probably a more elegant way. If you’re using a custom structure, be sure to note it before you change as it won’t be retained in the text field.
  3. Fix all the links inside the content – I just used a mysql “update”, like this:
    update wp_<your multisite blog id>_posts set post_content = replace(post_content,’/oldpath/’,’/newpath/’);
    For bonus points, you can create a backup as a temporary table before the replace. Be aware this backup table will go away after you terminate your mysql connection.
    create temporary table wp_<your multisite blog id>_posts_tmp select * from wp_<your multisite blog id>_posts;
    This should fix all embedded media and page links – but you’ll still need to test, obviously.
  4. Clear your object / apc caches by restarting apache and doing whatever else you need to clear your object cache backend. Since we’re directly editing mysql tables, the object cache doesn’t get the clues it needs to decache stale values and you can get weird issues. If you’ve got a frontend page cache, clear that too.

These steps have worked fine here, but it’s a bit more manual than I had hoped.

feed-abstract gem updated to support twitter RSS and Atom

I updated my feed-abstract gem to support twitter RSS/Atom, in that it will automatically parse hashtags and turn them into RSS item subjects/categories. Huzzah! This is pretty fun, as it allows tweets to be aggregated into TagTeam seamlessly and they can be remixed, archived, and searched by tag.

You can get at twitter RSS/Atom via URLs like: encoded hashtag


I’m sure there are more search parameters available too. If you want RSS, just change the “.atom” to “.rss”.

TagTeam close to 1.0

A long, complicated project of mine (under the direction of Peter Suber and the auspices of the Harvard Library Lab) is nearing its release date – TagTeam (source, demo site).

TagTeam is an RSS/Atom/RDF aggregator that allows administrators to remix and republish feeds on multiple levels. It also allows for the filtering of tags – additions, substitutions, and removals in a flexible “tiered” filtering system.

It uses the feed-abstract gem I wrote to create a “common object graph” between the different feed formats – this has been a huge time saver and made feed parsing much more reliable.