5

I have several different sites running off WordPress, and the URLs tend to get fairly long and cumbersome (particularly when I try to publish them via Twitter). I recently purchased a very short domain name, and I'd like to use it as the root of a personal URL shortening service.

So ...

  • http://www.eamann.com/portfolio would become http://eam.me/portfolio
  • http://www.mindsharestrategy.com/wp-xmlrpc-movabletype/ would become http://eam.me/df3DF
  • http://www.prosepainting.com/coffee-shop-part-1/ would become http://eam.me/csp1
  • And custom things like http://wordpress.stackexchange.com/questions/3076/feature-survey-what-would-you-want-in-a-resume-theme would become http://eam.me/wpa3076

Basically, I want to set up and manage my own TinyURL-like server ... but with some specific requirements:

  1. It should integrate fully with WordPress so I can dynamically create new short URLs whenever I create a page or a post (every piece of content I create on each site should have its own short URL).
  2. I can specify if I want the URL to be random (like /df3Df) or I can choose a unique string instead (like /wpa3076) at the time of URL creation
  3. I should be able to view/edit/manage the URLs I have in the database from within WordPress

At the moment, I'm leaning towards a standalone system like YOURLS that lives in its own database. The problem I'm facing (and I'll confess now that I haven't attempted it yet) is integrating the system fully with WordPress. I want each post to automatically suggest a short URL before I hit "publish" and then automatically create the URL when I finally do "publish" the post. I'd also like to administer all of my links from within each of the sites using the service.

Is this even possible? Is there already a solution around to do this? If not, where do I start?

(Cross-posted to StackOverflow)

4
  • 1
    YOURLS already has a WordPress integration plugin that does everything except allow you to define a custom string instead of using the randomly generated one. Commented Oct 20, 2010 at 20:30
  • I know Alex King's Twitter Tools uses bit.ly and posts to twitter. Is this not what you are looking for? Commented Oct 20, 2010 at 20:35
  • No ... I want to set up my own URL shortening service and manage it via WordPress.
    – EAMann
    Commented Oct 20, 2010 at 20:42
  • It looks like YOURLS is the way to go for now ... the plug-in just isn't quite as powerful as I'd want it to be. John, if you'll post your comment as an answer, I'll mark it as "the" answer.
    – EAMann
    Commented Oct 20, 2010 at 22:55

2 Answers 2

2

I've set up YOURLS for and have been extremely pleased. With the wordpress plugin, it will automatically create a short url for you if there isn't one. And with the Admin of YOURLS you can create your own custom short url's to anything you want, granted it isn't in WP Admin.

I don't believe you can set your own custom url at the post creation either, you would have to go into the YOURLS Admin to update it.

The other one I looked into was http://wordpress.org/extend/plugins/short-url-plugin/ but I wanted the more powerful backend that YOURLS provided; plus the post to twitter was a bonus.

2
  • It turned out that YOURLS was just about exactly what I need. The only think I don't like is that the WordPress plug-in requires your Twitter info ... I don't necessarily want to tweet every post with an automated message, but having a short URL for every post is still very valuable.
    – EAMann
    Commented Oct 23, 2010 at 16:14
  • Yeah, the twitter posting is an all or nothing. Would be nice to have it as a checkbox for each post. There is definitely some improvements that could be worked into the plugin, but the YOURLS as an application in itself is great! Commented Oct 24, 2010 at 17:11
0

It's not quite what you're looking for, but I use Shaun Inman's Lessn as my shortener, and on the WordPress side, I use the WP Lessn plugin to automatically generate the short links. Works like a charm, and Lessn is super simple.

It doesn't let you specify custom strings, nor can you manage these links from WP, but it's pretty much set & forget.

And sorry, I would have linked to everything, but as a new user, I can only post one link. Since Lessn & WP-Lessn are easy to find, I figured the example would be best.

1
  • Example link down.
    – kaiser
    Commented Sep 22, 2012 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.