Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Blogs hosted on get automatic link shortening via, but for those who prefer to seek out our own hosting solution is there a plugin that will, upon publishing a new post/page, make an api call to (or other such service) store the resulting url and return it from wp_get_shortlink()?

I have searched without success. Any help would be appreciated.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

There's this plugin:

share|improve this answer
Exactly what I was looking for, thanks! – Ryan Tenney Aug 18 '10 at 21:25

if you install the stats plugin on your self hosted wordpress blog, you will have the option to have shortlinks

share|improve this answer

You could also add something like this to your functions.php to add a short link (powered by tinyurl) to each post or page you have:

function shortLink($content) {
$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$short_url = file_get_contents(''.urlencode($url));

$content .=  '<div class="short-link">Here's a short link <a href=".$short_url.'">Short Link</a></div>';

return $content;


add_filter('the_content', 'shortLink');

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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