If you need automatic Bitly integration with your WordPress, check out Bitly URL Generator, a rewrite of Micah Ernst’s classic plugin of the same name.

This version improves upon the original plugin in a couple key ways:

  • add_post_type_support( 'my-cpt', 'bitly' ) works as expected, without needing to register additional actions for your custom post type.
  • Introduces a wp bitly backfill WP-CLI command for generating Bitly short URLs on old posts, instead of doing the backfill with wp-cron.

Like the original, the plugin filters pre_get_shortlink to return your Bitly short URL for wp_get_shortlink().

Feature request, bug report, or violent dissent? Hit me up with a Github issue.

Hand Built is Daniel Bachhuber, an effective developer with technology leadership you can trust.

How can I help?

Hit me at [email protected] with a short note about what you'd like to do.

My roots are WordPress and publishing, and I love pretty much everything related to web development (architecture, performance, security, etc.). When not working with clients, I also maintain WP-CLI (WordPress' command line interface) and other open source projects.