Premium URL Shortener

Premium URL Shortener is a PHP script that allows you to run your own URL shortening website.

Documentation on how to upgrade to version 7.X. If you stumble upon an issue or if you need help, please contact us.

Since we have migrated to another framework, it is possible that you experience some issues. Please don't hesitate to contact us and let us know so we can fix it as soon as possible. You can contact us via Codecanyon or our website. You can also open a ticket at our support portal. If you do so, please provide us as much information as possible.

Upgrading from a version lower than 5.9.X?

If you are upgrading from a version lower than 5.9.X, you can download the updater below because you need to upgrade to version 5.9.9 first before upgrading to version 7.X. Enter your Envato purchase code to download.

How to upgrade (Video)

1.0 Backup Files

The version 6.0 is the biggest update that ever happened to Premium URL Shortener. The upgrade requires a manual process that is very important. Please follow this guide carefully. It is very important to backup your files and your database. The process is somewhat hard but if you follow this guide, it will be very easy.

cPanel

  1. Enable maintenance mode in the admin panel > settings.
  2. Go to file manager and browser to the directory where the script is located
  3. Select all files and click on compress
  4. Download the compressed ZIP file to your computer and keep it safe
  5. Go to phpmyadmin > YOURDatabase > Export and export the database
  6. Keep these two in a secure location

Managed VPS without control panel

  1. Compress your files using zip command and download the file
  2. Export your database using mysql -u USER -p YOURDATABASE > /root/backup.sql command and download the file

Make sure the files are backed up correctly otherwise if you encounter an error with the new version, we will not be able to help you.

2.0 Replace Files

  1. Go to your folder then navigate to includes folder and open the file config.php and leave it open
  2. Delete all files related to the script without exception
  3. Upload the zip and extract it
  4. Compress the content directory from the old version and upload it to /public directory then extract to import your old assets
  5. For the following directories (and their subdirectories) and files, set the permission accordingly:
    • /storage: 755
    • /public/content/: 755
    • config.php: 644
  6. Rename config.sample.php to config.php

On managed VPS, you might need to set the ownership to www-data for the files above.

3.0 Old Config

The code has slightly changed for the config.php. Open your old includes/config.php and transfer the information to the new config.php as shown here. Copy and paste the information to the respective area. It is important to copy the SECURITY_TOKEN correctly!

includes/config.php

 $dbinfo = array(
   "host" => 'DATABASE_HOST',
   "db" => 'DATABASE_NAME',
   "user" => 'DATABASE_USER',
   "password" => 'DATABASE_PASSWORD',
   "prefix" => 'DATABASE_PREFIX'
 );

 $config = array(
   "timezone" => 'TIMEZONE',
   "cache" => FALSE,
   "cdn" => TRUE,
   "gzip" => TRUE,
   "security" => 'SECURITY_KEY',
   "public_token" => 'PUBLIC_TOKEN',

   "debug" => 0,
   "demo" => 0
 );
                  

3.0 New Config

The code has slightly changed for the config.php. Open your old includes/config.php and transfer the information to the new config.php as shown here. Copy and paste the information to the respective area. Leave the value for EncryptionToken as __ENC__

config.php

 define('DBhost', 'DATABASE_HOST');
define('DBname', 'DATABASE_NAME');
define('DBuser', 'DATABASE_USER');
define('DBpassword', 'DATABASE_PASSWORD');
define('DBprefix', 'DATABASE_PREFIX');

define('BASEPATH', 'AUTO');

define('USECDN', false);

define('CDNASSETS', null);
define('CDNUPLOADS', null);

define('FORCEURL', true);

define('TIMEZONE', 'TIMEZONE');

define('CACHE', true);

define('DEBUG', 0);

define('AuthToken', 'SECURITY_KEY');
define('EncryptionToken', '__ENC__');
define('PublicToken', 'PUBLIC_TOKEN');
                    

4.0 Change Domain Root

We have included a .htaccess file to forward all requests to the public folder so before doing this step check your website at https://YOURSITE.com/update to see if you get the updater or not. If you don't need it, skip to #5

The new version separates the core files from the public files. This adds a layer of security and protects core files from visitors. The new directory root is /public. You will need to change this on your server.

cPanel

  1. Go to domains or addon domains
  2. Find your domain and edit the the home directory and add /public at the end
  3. The final directory should be /public

Managed VPS without control panel

  1. Edit your conf file
  2. Update the DocumentRoot and add /public at the end
  3. Restart your server

5.0 Run Updater

Finally run the update at http://yoursite.com/update and follow the instructions provided on screen. This process will update your database to the latest version of the script.

Note: If you are upgrading from version 5.X, run http://yoursite.com/update twice to make sure everything is in order.

Issues

Since we have migrated to another framework, it is possible that you experience some issues. Please don't hesitate to contact us and let us know so we can fix it as soon as possible. You can contact us via Codecanyon or our website. You can also open a ticket at our support portal. If you do so, please provide us as much information as possible.