In our last few articles we have been focusing a lot on dealing with Short URLs and WordPress. While creating our new WordPress Gallery (Submit your WordPress Site), we had to deal with few issues that we did not cover on WPBeginner. Some of those issues were “How to Display Shortlinks in WordPress Theme“, or “How to Automatically Add Custom Fields on Every Post Publish“. Well in this article, we will actually show you how to automatically generate a Bit.ly or Bit.ly PRO URL (Remember the Branded Short URLs?) for each of your posts without editing a single line of code.
After going through numerous solutions, our developers came to the conclusion to use the plugin WP Bit.ly rather than reinventing the wheel. WP Bit.ly plugin allows you to generate short links using the Bit.ly API for all of your blogs posts and pages. In addition to that, this plugin generates a new meta box on your posts that show you statistics about your link (such as who’s clicking on your links). The best part about this plugin is that it hooks into the WordPress Shortlink filter, so it can be used by you, your visitors and a variety of other services that employ them.
First you need to download WP Bit.ly Plugin and Install it. (See our Step By Step Guide to Install a WordPress Plugin)
Then the plugin will need to be configured with your Bit.ly account. If you don’t have one, then you would need to signup to have a personalized API. To retrieve your Bit.ly API, go under the Settings Tab in your bit.ly account (Hint: it is located in the top right where your username is).
Now let’s configure the plugin. Go to Settings » WP Bit.ly in your WordPress Admin Panel.

Enter your Bit.ly Username, and the API Key. Then select your Post Types that you want to generate the link for. Click save changes and you are done.
To check if it is working, simply open your Bit.ly account, and you will see tons of new links generated. Or you can simply go to any of your post and click on the Short Link button, and you should see a box with your Bit.ly link or Bit.ly Pro link like in the image below:

This plugin is extremely easy to use, it does the job very well, and it has amazing future development plans: “Future development will include the ability to use your own domain as the short link (http://yourdomain.com/bXhGjs).”







The plugin wp-bit.ly is not working i can’t enter my login information in settings for bit.ly
Not sure why it wouldn’t work. It’s working on our site.
yeah, i also facing the same issue
can some point out whats the prblm?
@sayed any chances of solving the prblm?
Not sure why this is not working. It works on our site. Please contact the plugin developer using the WordPress support forums.
Have some troubles! It create a new link in my admin bar, which is always the same, but in my dashboard it create correct links for all posts. And if i use the_shortlink() function in single.php it create a correct link too. How can I fix problem in admin bar? and how can i get only URL of short link, therefor the_shortlink() create full link.
If you read the beginning of this article, it links to other tutorial that will show you how to add these shortlinks in themes..
Cool thing! CAn ypu perhaps explain how to use that shortlink (in my case a pro custom url short link) in the side sharebar much like you have here on your site too?
Cheers
http://www.asiantv.org
Isn’t this just a duplication of the WordPress built in short urls? Which themselves can be made to look nicer with a few quick pokes of the htaccess file: http://chrisradford.com/s/327
Or am I totally missing something here?
Well yes and no. Your domain is too big << chrisradford.com or ours wpbeginner.com … by utilizing this trick, we can use wpbeg.in << and then have a shorter branded URL.
Cool thing! CAn ypu perhaps explain how to use that shortlink (in my case a pro custom url short link) in the side sharebar much like you have here on your site too?
Cheers
You can use it in your tweets. Or look at the articles that we linked to in the beginning of the post. That explains how you can use them in your theme.
Thanks for the info. Will definitely try this as its good for my twitter post. Tx