Your Own URL Shortening Service

Short is Better URL Shortening is extremely useful when it comes to sharing URLs on IMs or Twitter and is easy to be read and remembered by humans. And TinyURL has been doing this for years and is perhaps the most famous Shortening Service with its easy-to-use API along with

Shorty is a very simple PHP based URL Shortening script. As this works on PHP, you’ll obviously need Linux Hosting / Apache Server. If you don’t have, you look for some free PHP Hosting. You’ll also have to create a MySQL Database to store shortened addresses and its link. You’ll learn about it in the next few steps.

Here’s all that you need:

  1. PHP (Apache Server/Linux Hosting)
  2. 1 MySQL Database (new or existing)
  3. FTP/File Uploader
  4. Shorty Script
  5. Few minutes of your valuable time

Ready to go? Follow the steps below

Downloading Shorty

Download Shorty Beta here. Once you have downloaded Shorty, unpack the ZIP archive and upload/FTP the files to a folder (or) subdomain in your site (eg: ‘go’ , so that Shorty files will be in

Configuring Shorty

You’ll have to configure Shorty by editing configuration.php. You’ll have update it with your MySQL Username and Password and the Database name. You can use an existing Database or create a new one. Please use your Control Panel (cPanel, DirectAdmin, VistaPanel, hosting based) to create one. If you are not sure, contact your hosting provider.

Now, open configuration.php. You’ll have to edit the following lines.

$db[‘server’] = ‘localhost’;
$db[‘username’] = ‘username’;
$db[‘password’] = ‘password’;
$db[‘database’] = ‘databaseName’;

$main_table = ‘shorty_shorties’;
$user_table = ‘shorty_users’;

username is your MySQL User (eg: yourhost_username) and password is your MySQL user’s password. Similarly, databaseName is the name of your database (eg: yourhost_database). Once you have changed these fields to point to your database, save it and proceed to Installation.

Note: Advanced users can edit the $main_table & $user_table values to point to the name of the Database tables you wish to create. The value of $main_table will be the table to store redirection and $user_table will be the table to store Shorty user accounts.

Installing Shorty

Updated Configuration.php? If so, you are all set to get back to GUI :)

You’ll have to install Shorty by running the self-installation located at, where ‘go’ is the directory in which you have placed Shorty files in. This installation will create the administrator account for you. Now, key in your the username you wish to create, password and your email and click Install. If your installation was successful, you’ll presented with a page stating that your installation was successful.

Be sure to remove _install.php after you’ve installed.

You can now login and start creating short URLs on your very own Shortening Service. :)