Linkwren: Self-Hosted URL Shortener with Analytics

Short links on your own domain, with click stats, unique visitors and QR codes.

PHP script 0 sales Updated 22 Oct 2026

Linkwren is a self-hosted URL shortener for PHP 8 hosting. Make short links like yourdomain.com/tickets, see how many people click them and where they came from, and print a QR code for each one. Designed and built with the help of AI tools.

What it does

  • Short links at /your-alias via .htaccess, or r.php?c=your-alias on any host
  • Custom or random aliases with reserved-word checks, titles, 301 or 302 redirects
  • Expiry dates, optional link passwords, pause and resume, friendly visitor pages
  • Analytics per link: clicks per day, unique visitors, referrer domains, devices, browsers, operating systems and languages over 7, 30 or 90 days
  • Unique visitors counted with a hashed IP and a daily salt; IP addresses are never stored and bots are skipped
  • Overview with totals, a 30-day chart, top links and top referrers
  • QR code for every link, downloadable as SVG
  • CSV export of clicks and CSV import of links
  • Optional public shorten page with rate limiting and a domain blocklist
  • Light and dark mode, works on phones from 320px

Under the hood

PHP 8 with PDO, MySQL/MariaDB or SQLite, vanilla JavaScript and CSS. The charts, QR encoder and user-agent parser are built in, with no libraries. Prepared statements, password hashing, CSRF tokens, escaped output and sign-in rate limiting. No frameworks and no CDNs.

In the download

The script with a web installer and optional demo data (a fictional folk festival), HTML documentation with cPanel and Hostinger steps, README, changelog and licence. Two OFL fonts are bundled.

Features

  • Short links on your own domain
  • Custom aliases with reserved-word checks
  • 301 or 302 redirects
  • Expiry dates and link passwords
  • Clicks, unique visitors, referrers, devices
  • Browsers, systems and languages per link
  • 30-day overview chart (inline SVG)
  • QR code SVG for every link
  • CSV import and CSV export
  • Optional public shorten page with rate limit
  • MySQL, MariaDB or SQLite with web installer
  • Light and dark mode

Changelog

1.0.0 (21 Oct 2026)

  • First release.

Reviews

No reviews yet. Buyers can leave one from this page.