Lessn More 2.5.1

Homepage: https://lessnmore.net
Source/Fork: https://github.com/alanhogan/lessnmore

Lessn More is a free, open-source personal URL shortener with a lot of enhancements over the original 2009 Lessn.


Attention to detail





Lessn was the original personal URL shortening service, written by Shaun Inman. It required PHP, MySQL, and mod_rewrite.


Buttered URLs is a Lessn fork by Jeremy Knope. Buttered URLs added logging, custom URLs, a migration mechanism, and support for more database types.


Lessn More is a Buttered URLs fork by Alan Hogan. Lessn More increased the robustness of the insertion algorithm, prevented slug conflicts, updated the bookmarklets, added multiple auto-shorten modes, banned word lists, and enhanced security.


Trims punctuation from the right of the slug, per best practices


Better stats page.

More compatible with sqlite (see #7).

Other small fixes and improvements.

Supports a custom timezone in config.php.

Special thanks to Matt Wiebe for a lot of these changes.


Returns https:// short URLs when running on a secure server.

Allows shrinking of non-Web URIs such as ftp: or magnet:.


Users logging in over HTTPS will be authenticated with a cookie that will not leak out over HTTPS

Cookies are now set with HTTP_ONLY, which means rogue JavaScript cannot steal your authentication cookie

There is now a LOG OUT button

Lessn More now checks for an updated version of itself whenever you use the web interface. (You still have to manually upgrade!)


Stopped checking for new versions of Lessn More whiled logged out, because it will always fail then.


Big news! Now you can configure Lessn More to generate random slugs of a desired length instead of incremental, guessable slugs. This means you will generate URLs like /8RTvaN, /Nvb3QP instead of /a, /b, /c, if desired.

The link in LM's header now points to your main admin page, and the update check info in the footer will always link to the LM project home page.


Fixes JavaScript and the Back button on the stats page when on HTTPS.


Lessn is offered as-is, sans support and without warranty. Copyright © 2009-10 Shaun Inman and contributors. Offered under a BSD-like license; see license.txt.


Installation instructions are different depending on if you are upgrading or doing a fresh install.

All the following refer to files inside the dist folder.

Fresh Install

ONLY follow these instructions if you are not upgrading!

  1. Copy or rename /-/config-example.php to /-/config.php.

  2. Open /-/config.php in a plaintext editor and create a Lessn username and password then enter your database connection details. You may also choose other settings such as authentication salts, a default home page, and your current time zone.

  3. For the shortest URLs possible, upload the contents of this directory (dist) to your domain's root public folder.

  4. Visit http://doma.in/install.php to create the necessary database tables. (Watch for errors.)

  5. Visit http://doma.in/-/ to log in & start using Lessn More! Be sure to grab the bookmarklets.

NOTE: If your Lessn'd urls aren't working you probably didn't upload the .htaccess file. Enable "Show invisible files" in your FTP application. It's also possible that your host doesn't like the <IfModule> directives; try removed them and just leaving the Rewrite* lines that were wrapped by the <IfModule>. (This seems to happen on 1and1). Or, maybe you aren’t on Apache. That’s OK, probably — see the Requirements section.


If you are upgrading from a previous version of Lessn or ButteredURLs:

Upgrading from Lessn 1.0.0 or 1.0.1

  1. Using a tool like PhpMyAdmin or the MySQL CLI change the checksum index type to INDEX (from UNIQUE).
  2. Continue below with "ALL VERSIONS"

ALL VERSIONS: Upgrading to Lessn More 2

  1. You are strongly encouraged to back up your database.
  2. Note some old redirections so you can manually check they still work after upgrading (they should, but hey, it's important).
  3. Manually merge your old configs into the new config file. There will be new options you will want to make decisions about.
  4. Upload all lessn/BU files, excluding config.php, or making sure to use the new one.
  5. Go to http://doma.in/install.php?start=N where N is 2 if upgrading from Lessn 1.0, or
    N is 4 if upgrading from ButteredURLs 1.1.
  6. Test some old known working redirections
  7. Delete install.php.
  8. Grab the new bookmarklets with custom short URL support!

Congratulations. You are running the latest version of Lessn More.

Upgrading from Lessn More 2.0 or 2.1 to LM 2.2

Just upload the latest copy of Lessn More to your server, but skip or delete install.php.

Note that since v2.2, there is only a config-example.php file in the distribution, and no config.php file. You will not need to take care to avoid overwriting your existing config.php file, but do take care not to replace the whole /-/ folder and your config.php file; please make a backup copy of it before upgrading.

Upgrading from Lessn More 2.2 to 2.3

You only need the new /-/index.php for this upgrade. Optionally, add the new PROTOCOL_OVERRIDE constant from config-example.php into your config.php.

Upgrading from 2.3.0 to 2.4.0

Just copy over all the files in dist/ to your web server’s root (or wherever you previously installed Lessn More). Skip or delete install.php.

Upgrading from 2.4 to 2.5.0

Please replace the files on your site with those in the dist/ folder (keeping your config file). Add the new constant RANDOM_SLUG_LENGTH to your config.php. Be sure you get the new random_compat folder in /-/library if you are not on on PHP 7 or newer.

Upgrading from 2.5.0 to 2.5.1

Only /-/pages/stats.php changed in this release.


You can find API documentation here. It's super simple.


To report an issue or check known issues, visit the Lessn More issue tracker on GitHub.

Installation tips

  1. You may need to install the following packages for PHP:

    • php-bcmath
    • php-pdo
  2. If you are getting 404 Not Found errors when you try to use the shortlinks, and you have got the .htaccess file in place correctly, check if your Apache httpd.conf has AllowOverride set to All. If it is None then the .htaccess will get ignored.

  3. To help debug installation problems, add this line to the end of ./-/config.php:

    define('DISPLAY_ERRORS', true);