How to Install Yourls? Step by Step Tutorial


How to Install Yourls? Step by Step Tutorial

Yourls is a free Url shortener script which provides complete stats of shorten urls. Today I’m going to write about installing the Yourls script on your server. If you have a domain www.example.com, then you can use a folder likewww.example.com/s (s for short) for installing Yourls script. Or you can always buy a new short domain name and set Yourls on that. I will suggest to register a .yt domain which have a lot short names available. Or you can go for .be which is much cheap, just for almost 6$ per year. Well, installation is almost same in both cases. So, let me start the tutorial with some steps, things you need to have to install Yourls Url shortener script and how to install it.

Tutorial: How to Install Yourls?

1. Preparing Files

1.1. Download lasted version of Yourls Script.
1.2. Create a MySQL Database and save information in a text file. You can watch this video tutorial for creating MySQL database in cPanel.
1.3. Unzip the downloaded Yourls script and open the folder “User”. Rename the file “config-sample” to “config”and open it in a Raw text editor or Dreamweaver. (I’m using Dreamweaver).

2. Editing the Config.php

2.1. Insert the MySQL information into the MySQL Settings section of that file. See below 2 screenshots and inset your MySQL information according to the second screen shoot.
Change this:
Edit Config.php File of Yourls
Edit Config.php File of Yourls
To this:
Edit Config.php File of Yourls
Edit Config.php File of Yourls
You can get your Database information from your Host. You may need to change localhost if you are using Godaddy’s webshosting. Well, enter these database information in this format and go to next step.
2.2. Now you will need to insert your website address in that code. The address where your are going to install Yourls Scrpt. If you installing it in root then it will www.example.com, but if you are installing it in any folder then you need to write that also. For example www.example.com/url (Yourls is installed in folder URL).
See below 2 screenshots and change insert your website address accordingly:
Change this:
Enter Website Address in Yourls Config.php File
Enter Website Address in Yourls Config.php File
To this:
Insert Website Address in Config.php of Yourls
Insert Website Address in Config.php of Yourls
Note that I have written http://taimoorsultan.com/url because I’m installing Yourls in URL folder. If you are installing it in root of your website, then simple use http://example.com
2.3. Now you need to insert your Username and Password to login to your Admin panel of Yourls. For this scroll down and find the Username and Password section, as seen in the below screen shot:
Set Username and Password in Yourls
Set Username and Password in Yourls
Delete the second Username and Password line and enter your desired Username and Password in the first line, as shown in the below screenshot:
Set Username and Password in Yourls
Set Username and Password in Yourls
After you have entered your Username and Password, save Config.php file and close it.

3. Uploading Files to Server

3.1. Now use FTP to upload all files of Yourls on your server. Here again keep in mind that if you are installing Yourls in any folder (Which you have specified in step 2.2, then upload your files in exactly that folder on server).

4. Installation

After your uploading is complete, now you can install your Yourls script. Point your browser tohttp://www.example.com/admin. If you have uploaded Yourls in a folder then usehttp://www.example.com/folder/admin. Like in my case, I have uploaded Yourls in URL folder, and now I will go tohttp://taimoorsultan.com/url/admin. Click on “Install Yourls” button.
In a second or two, your installation will be complete and you will be allowed to go to your Yourls Administration Panel. That’s it, you have successfully installed your own copy of Yourls Url Shortener script. Now, you can shorten URL any time with out any restriction or with relying on other services. So, play with Yourls to know more about it.
Note: Some times mistakes in editing Config.php file will show errors while installation. If you are facing these error, try editing and inserting information in config.php again and I hope your problem will be solved. If you still face any problem then feel free to ask me, I will be more than happy to help you and make you able to install Yourls on your server.
Good day!
Share on Google Plus

About Chathura

    Blogger Comment
    Facebook Comment