Stable Shortlinks

Description

Stable Shortlinks is a lightweight URL shortener for WordPress built around a simple principle: do one thing, and do it well.

When a post is saved, the plugin assigns it a short URL on your own domain. That shortlink stays associated with the post through edits and permalink changes, and redirects to the post’s current URL when the post is publicly viewable.

Shortlinks appear above and below individual posts with a copy-to-clipboard button, making them easy to share. All mappings stay in your WordPress database.

Following the Unix philosophy of small tools with a single, clearly defined purpose, Stable Shortlinks focuses on reliable short URLs with minimal configuration.

What it does

  • Creates a short URL when a post is saved.
  • Preserves that short URL through edits and permalink changes.
  • Redirects to the post’s current permalink.
  • Uses your own WordPress domain.
  • Stores all mappings locally in your WordPress database.
  • Displays the shortlink above and below the post.
  • Provides a copy-to-clipboard button.

A deliberately small feature set

There are no click analytics, visitor tracking, campaign tools, external shortening services, third-party accounts, or APIs to configure. There is no administration dashboard full of options.

Stable Shortlinks is for site owners who want stable short URLs for their posts and a small plugin with a clearly defined job.

Installation

Activation creates a table using your configured database prefix and character set. Existing mapping tables are preserved. InnoDB support, an InnoDB posts table, and permission to create tables and foreign keys are required.

  1. Upload the stable-shortlinks folder to wp-content/plugins/, or upload the plugin ZIP through Plugins > Add New.
  2. Activate Stable Shortlinks through the Plugins screen. On multisite, activate it separately for each site; network activation is not supported.
  3. Save a post to generate its short link. Existing posts without mappings receive a link the next time they are saved.

Upgrading from xeu-su

Deactivate the old plugin and remove its folder manually before activating Stable Shortlinks. Do not delete the old plugin through WordPress: that runs its uninstall routine and removes all mappings. The existing short_urls table and all short links are preserved by the renamed plugin. Do not activate both versions together.

FAQ

Will a shortlink survive a permalink change?

Yes. The short code stays associated with the post, and redirects use its current permalink. Shortlinks work while the plugin is active, the mapping exists, and the post is publicly viewable. Deleting a post removes its mapping.

Do existing posts get shortlinks automatically?

Existing mappings are preserved. Posts without a mapping receive a shortlink the next time they are saved; activation does not generate links for all existing posts.

What happens when I deactivate or delete the plugin?

Deactivation preserves mappings. Deleting the plugin through WordPress permanently drops its mapping table and removes all short links. On multisite this applies to all sites. Manually deleting plugin files does not run database cleanup.

Can a short code conflict with an existing URL?

Codes use the site’s root URL path. A code matching an existing path can take precedence over that path. Use this plugin on sites where that routing behavior is acceptable.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Stable Shortlinks” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Stable Shortlinks” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.2.0

  • Renamed the plugin to Stable Shortlinks, including its directory, entry point, text domain, and internal prefixes.
  • Preserved the existing mapping table and short URLs.

1.1.0

  • Added automatic table creation and uninstall cleanup.
  • Added database-prefix support, prepared identifiers, escaped output, and translated interface strings.
  • Added scoped frontend assets and safer redirects.

1.0

  • Initial short-link generation, display, and redirects.