I needed to setup my own URL shortening service for a project and found YOURLS. Simple to setup, easy to use and can be setup to have no public access a simple front page or API access. Just what I was looking for. I created a simple front page based on the example you get given and gave it some Twitter Bootstrap love!

Now how to connect it up to WordPress….

There was a plugin released by the genius behind YOURLS but it had all kinds of funky Twitter integration that I didn’t want. Next I manage to find a modified version which did all the hooking up of your WordPress and YOURLS but left Twitter out, perfect. Well almost.

One thing I didn’t like was that when using a remote YOURLS install it asked for your username and password, which seemed a little last year. YOURLS supports API tokens/signatures and even generates one for you in the YOURLS admin area.

So I did a little bit of modest customisation and switched it all to API Signature authentication. It’s a little buggy when you first set up the authentication details. It’s best to just enter your details and hit save rather than the Check button, this wasn’t working for me but in real life it was working and talking to my YOURLS install.

Anyway, you can find it on my GitHub page here. Have a look, use it, don’t use it. I’m not going to be answering support questions however you’re better off with the “Official” plugin if you want support!

YOURLS WordPress Plugin on GitHub

Leave a Reply

Mojowill Avatar

Who the Hell am I?

I'm Will, a full time web developer, geek and musician. I develop using PHP and MySQL and spend most of my time working with WordPress or CakePHP. When I'm not buried in code I'm gaming, cooking or writing and recording music in my studio. I like sci-fi, pancakes and coffee and am totally prepared for the zombie apocalypse...

Stalk me on these other sites...

Why not be super creepy and check me out on all these other sites, I think they call it social media?

%d bloggers like this: