
In this post I’ll show you how to install a free URL Shortner Script (similar to bit.ly or tinyurl.com) called Yourls.
I use this script in place of a traditional link cloaking script to cloak affiliate links, as well as for tracking links in emails etc. It’s quite robust for a free script, so I highly recommend you use it.
The downside of this script of course is that it’s a little bit technical to install. So, I’ve decided to show you a simple 3 step process to install this script on your own server.
Before you begin, you will need to setup a MYSQL database. If you don’t know how, I created a post on how to setup MYSQL a while back, so follow the steps there then come back to this post.
The following steps assumes that you have a domain you can use (can be a sub-folder / sub-domain on an existing site as well) already installed your MYSQL database, and that you have downloaded the latest version of Yourls.
I’m also assuming that you know how to use a basic FTP program like Filezilla or SmartFTP (or something similar).
Once you’ve downloaded the script, you want to upload your script to the desired domain or sub-domain / sub-folder. For this example I will install it in a sub-folder named “go” using my FTP program (I use WS_FTP):

Once you’ve named the folder, simply unzip your copy of Yourls (that you downloaded earlier) and copy the content to the folder, like this:

Note: You will have to locate your newly made MYSQL database, username and password for this.
Once you have the MYSQL information handy, you need to go to your installation and go to the user sub-folder of your installation and locate the file called: config-sample.php

Missing the Config.php File?
I recently downloaded a version of YOURLS and it was MISSING the config-sample.php file. So just in case you’re missing it too… here’s a zip file with the php file:
Your Zip File
You may need to right-click the following links and select Save Link As to download the file to your computer:
Once you’ve located the file, you’d want to edit it…
You can do this generally from within your FTP client software or you can simply edit the file on your hard drive and re-upload it. (I do the former).
Here’s what you need to edit (I’ve circled everything in RED):

I’ve gone ahead and change the default text in the areas I circled, just to emphasize that they need to be changed.
For your “cookie key” field, you can use the free password generator.
IMPORTANT: Once you’ve edited everything, simply save the file (and if needed, re-upload to your server) and rename it from config-sample.php to config.php.
You’ve edited the config file and renamed it to config.php, now you want to point your browser to the admin area of your script and install the script!
The admin area can be found here (provided you installed it into the “go” sub-folder like I did): http://yoursite.com/go/admin/
Here you’ll see this:

Click on “Install YOURLS” and let the script run.
Provided you typed everything in properly into the config file, you should see a “success” message like this:

Once you’re done, simply go to the YOURLS admin screen by following the link on the screen (above) or by going to:
http://yoursite.com/go/admin/ (again, provided you installed it in the ‘go’ sub-folder)

Because I use this link shortener script to cloak my affiliate links and also to keep track of CTR on various things, I DO NOT setup the front-end (that’s visible to the public) for this script.
Instead, I simply upload a blank index.html file to the directory, so that when someone tries to access the directory: http://yourdomain.com/go/ it only gives them a blank page.

You can do the same by uploading a blank index.html file to your folder.
I’ve included a blank index file in case you don’t know how to create one… (it’s in a zip file so you will have to unzip the file before you upload to your directory):
Your Downloads
You may need to right-click the following links and select Save Link As to download the file to your computer:
If you choose to make this area public, be sure to edit the files that are already uploaded to the folder.
You’re ready to start using the script!
First, login to your admin area, then simply enter your desired information:

Then click the “Shorten The URL” button.
You will then get a couple of new boxes that will appear below the area where you entered the information. Just copy the link from this area (all you need to do is left click on the area and it will automatically copy your new link):
And you’re good to go!
So in this case, my “cloaked” url is this: http://supersimplemarketing.com/go/facebook
This Post Is Sponsored By:
- Get My Micro Niche Blogging Course! - Last chance to get your hands on my micro niche blogging course. Ends on March 31st!
- Micro Niche Blog - Let Me Build You A Niche Blog!
- Proven Niche Manifesto - Tested & Proven Profitable Niches - stop wasting time and start making money today!
- Immediate Cash Blueprint - Super Simple Profit Formula | Earn Money This Week!
Subscribe to my “Near-Daily Newsletter” and I’ll share with you Practical Tips, News & Ideas on internet marketing topics (access to this newsletter is free at the moment, and you can un-subscribe with one click).
If you like this post, then please SHARE IT!
Share and Enjoy
Tags: link cloaker, link shortener script, yourls

Leave A Reply (9 comments So Far)
Pingback: How to Install Your Own URL Shortener Script | MostTalkedNews.com