YOURLS (Your Own URL Shortener) is a URL shortener, like TinyURL, except it’s all GPL and you can run it on your own server, publicly or for your own use only. It was made by Lester Chan and myself. Learn more about YOURLS.
This plugin, YOURLS: WordPress to Twitter, is the bridge between YOURLS, Twitter and your blog: when you publish a post or a page, it will use your own YOURLS install, either hosted on the same webserver, or another server, to create a short URL for your post and send it to your Twitter account. The plugin also works with public popular services such as TinyURL, tr.im, is.gd or bit.ly.
Download
Extract and upload to your blog, preserving directory structure.
Enjoy.
Features and configuration
I’m going to be lazy, aren’t screenshots worth a thousand words? Here are 3000 words.
Plugin configuration:

Title little helper: count characters to help you keep under the tweetable 140 char limit:

From the Write screen, you can (re)generate short URLs and (re)promote your (old, for example) posts:

Template Tags for you theme
The plugin comes with two template tags:
wp_ozh_yourls_url()
Will echo a HTML link with short URL (will generate it on the fly if needed) for the current post.
Example output: <a href="http://ozh.in/j5" rel="nofollow alternate shorter" title="short URL">http://ozh.in/j5</a>
Suggested use: in the loop, in single.php, in page.php
wp_ozh_yourls_head_linkrel()
Will output a <link/> in <head> for the current post (see revcanonical.appspot.com and shorturl.appjet.net for more info)
Example output: <link rel="alternate short shorter shorturl" href="http://ozh.in/j5" />\n
Suggested use: in header.php, if is_single() or is_page()
wp_ozh_yourls_raw_url()
Will return (or echo if you pass true to it) the short URL, with no HTML tag or anything else. Just the raw URL.
Feedback
Yeah. Go ahead.
Related posts
Shorter URL
Want to share or tweet this page? Please use this short URL: http://ozh.in/m7
Metastuff
146 Blablas
Pages: [15] 14 13 12 11 10 9 8 7 6 5 … 1 » Show All
Pages: [15] 14 13 12 11 10 9 8 7 6 5 … 1 » Show All
thought, on 02/Mar/10 at 10:44 pm # :
Ah-ha, I have a lot of problems auto-updating Wordpress, so I’ll start my investigations there. Thank you very much.
replied, on 02/Mar/10 at 10:33 pm # :
michael » The plugin uses the internal WP API to make HTTP requests. If you can, say, auto update WP or plugins, it should just work.
replied, on 02/Mar/10 at 10:26 pm # :
Just to double check, I just switched the plugin to using is.gd instead of my own service and received the same error. Is there some specific setting on the server I need to set?
thought, on 02/Mar/10 at 8:34 pm # :
michael » your blog cannot access your YOURLS setup. Wrong login/password, or web hosts cannot connect to each other (firewall etc)
commented, on 02/Mar/10 at 8:29 pm # :
I set up my own remote YOURLS install, but I can’t seem to get my site to shorten a URL with it. I keep getting the “Bleh. Could not generate short URL.” Error. Any ideas?
commented, on 24/Feb/10 at 6:18 am # :
LOL. Thanks a million. That was actually the problem. I’ve deactivated it and the links are no longer showing up.
Thanks man.