WordPress URL Shortener Plugin: Short Links Inside WordPress
How a WordPress URL shortener plugin works, how to set up ours in minutes, and how it compares with Pretty Links, Bitly, ThirstyAffiliates, and BetterLinks.
A WordPress URL shortener plugin creates a short, branded version of a post or page URL from inside the WordPress editor, saves it with the post, and (on good plugins) tracks clicks on it. Our plugin adds a sidebar box to every post and page: paste an API key once in Settings, then generate a short link in a click, or turn on auto-shorten so one gets made the first time you hit publish. The link lives in your account like any other link, so you can edit the destination, use a custom domain, and read analytics from the dashboard.
WordPress ships with a built-in short URL (the ?p=123 kind), and nobody uses it. The reason isn't that it's ugly, though it is. It's that example.com/?p=123 isn't tracked, isn't branded, and everyone copies the pretty permalink anyway. If you want short links that earn their place in a post on X, a newsletter, a QR code, or a sidebar widget, a WordPress URL shortener plugin is the way to get them: it creates each link on a real shortener and stores it alongside the post.
This guide covers what to look for in a WordPress URL shortener plugin, how to install and configure ours in about four minutes, and how the other common options stack up. It assumes you have WordPress 5.8+ and admin access.
Table of Contents
- What a WordPress URL Shortener Plugin Actually Does
- Why Not Just Copy-Paste From a Shortener Dashboard?
- Our WordPress Plugin at a Glance
- How to Install and Set Up the Plugin
- Generating Your First Short Link
- Branded Short Domains: The Setting That Makes This Worth It
- Best WordPress URL Shortener Plugins Compared
- Which Plugin Fits Which Site?
- Common Gotchas (and Fixes)
- Frequently Asked Questions
What a WordPress URL Shortener Plugin Actually Does
A WordPress URL shortener plugin creates a short link for the posts and pages you publish, stores it as post meta, and shows it in the editor so you can copy it with one click. The best ones go further: they call an external shortener's API so the link lives on an account you own (with click analytics), they let you pick a branded domain, and they can create a short link automatically the moment a post is first published.
The mental model is boring on purpose. The plugin is glue. The real work (creating the link, counting clicks, managing custom domains) happens on the shortener's servers. The plugin exists so you never leave the editor to get a usable share URL. Everything else - tags, folders, A/B tests, QR codes, bio pages - is managed in the shortener's dashboard, exactly as it would be for a link created any other way.
For what happens under the hood, our guide to how URL shortening works covers the redirect flow: a short URL is a lookup with a 301 redirect at the end. The plugin is only involved for the moment it takes to create that lookup.
Why Not Just Copy-Paste From a Shortener Dashboard?
You can. Plenty of people do. The problem shows up around article number twenty. Every new post needs a short link, every short link needs a sensible alias, and every alias needs to be pasted into the post or kept somewhere findable. When a destination moves, nobody can remember which short URL went with which post, because that connection lives only in your head.
A plugin fixes four things at once:
- The link is stored with the post in
_u2l_short_linkpost meta. Need it two years later? Open the post, look at the sidebar, done. - The alias can match the slug. No more
u2l.ai/aK9f2next to posts you spent an hour naming. - Auto-shorten on publish means you can't forget. The link exists the moment the post goes live.
- No context switch. Shortening inside the editor takes one click. Opening a dashboard in a new tab takes thirty seconds, every time.
If you publish more than once a week, the plugin pays for itself in attention saved, even before you look at analytics.
Our WordPress Plugin at a Glance
The U2L AI plugin on wordpress.org adds a small, deliberately plain box to the sidebar of every post and page editor. Before a link exists, it shows an optional "custom alias" field and a Generate short link button. After you generate, it shows the short URL with a Delete short link button next to it. That's the whole interface.
What it does behind that box:
- Calls our REST API (
https://u2l.ai/api/v1) with the post's public permalink and title. - Saves the returned short URL as post meta (
_u2l_short_link) so it stays attached to the post. - Optionally listens on WordPress's
transition_post_statushook and creates a link the first time a post moves to "publish". - Lets you pin all short links to one of the domains connected to your account, or leave the field blank for automatic domain placement.
- Deletes the link in your account when you click Delete short link, so no orphan link is left behind in the dashboard.
A single Settings → U2L AI page holds the API key, the optional short domain, and the auto-shorten toggle. Once you save a key, the page shows which account it belongs to and that account's plan, so you know the connection is live.
Every plan includes API access, the free one too, so a free account is all the plugin needs. Everything beyond the plugin's job - A/B testing, geo routing, custom social previews and the rest - lives in the dashboard, where you can apply it to the same links.
How to Install and Set Up the Plugin
Step 1: Install the plugin from the WordPress directory
In WordPress admin, go to Plugins → Add New, search for "U2L AI", click Install Now, then Activate. You can also download the zip from wordpress.org/plugins/u2l-ai and upload it manually. It requires WordPress 5.8+ and PHP 7.4+.
Step 2: Create an account (free works)
If you don't have one yet, sign up. The free plan includes API access, so you can connect the plugin straight away.
Step 3: Generate an API key
In your dashboard, open Settings → API Keys and create a new key. Copy it right away - the dashboard shows the full value only once. Treat the key like a password; anyone who has it can create or delete links in your account.
Step 4: Paste the key into WordPress
Back in WordPress, go to Settings → U2L AI, paste the key into the API key field, and click Save Changes. When the key is valid, a "Connected as (your email)" notice appears with your plan name. If you get an error instead, the key is wrong or revoked; create a new one and try again.
Step 5: Pick a short domain (optional but recommended)
On the same page, enter one of the domains connected to your account in the Short domain field, or leave it blank for automatic placement. To add your own domain first, follow our custom short domain DNS guide, then come back.
Step 6: Turn on auto-shorten (optional)
To create a short link automatically the first time a post or page is published, tick Auto-shorten and save. New posts get a link the moment they go from draft to published. Existing posts are untouched; you can still click generate on them manually.
That's the whole setup. From here on, every post and page you edit has a U2L AI Short Link box in the sidebar.
Generating Your First Short Link
Open any published post or page. In the sidebar, the short link box shows a custom alias field and a Generate short link button. Type an alias if you want a specific one (letters, numbers, hyphens, and underscores), or leave it blank for an automatic slug. Click generate.
A moment later the box switches to the "link exists" state, showing the full short URL and a Delete short link button. Open the URL in a new tab to confirm it redirects to the post. The same link is now in your dashboard, where you can add tags, move it into a folder, edit the destination later, or create a dynamic QR code for the post, all without touching WordPress again.
Drafts are a deliberate exception. Until the post is published, the box shows a note: "Publish first - the short link points at the public permalink." That's on purpose. A short link aimed at a draft breaks the moment the slug changes, and there's no good reason to create one before the permalink is final.
Need to start over? Hit Delete short link. The plugin deletes the link in your account and clears the post meta on your side. If you already deleted the link from the dashboard, the plugin sees that it's gone and clears your side without complaint.
Branded Short Domains: The Setting That Makes This Worth It
The single biggest upgrade a shortener plugin can give you is the short domain. Shared short domains work fine, but a branded one like links.yourbrand.com reads very differently in a social post, an email signature, or a QR code on a flyer, because the domain is the first thing people judge a short link by. Our explainer on branded links covers why that trust signal matters.
To use a branded short domain with the plugin:
- In your dashboard, open the custom domains section and add a short domain you own (or buy a short
.coor.linkdomain and point it at us). - Add the DNS record the dashboard shows: a CNAME for a subdomain, or an A record for a root domain. SSL is set up automatically; nothing to install on your server.
- Back in WordPress, go to Settings → U2L AI, type the new domain into the Short domain field, and save.
From then on, every short link the plugin creates uses that domain. No republishing, no code changes. Verification usually finishes within minutes but can take longer if your DNS provider is slow to update; our custom domain DNS walkthrough covers Cloudflare, GoDaddy, Namecheap, and the usual verification snags.
Best WordPress URL Shortener Plugins Compared
Here's how the WordPress URL shortener plugins most site owners look at compare. U2L AI is our product, so weigh our take accordingly; features change often, so check each plugin's listing before you choose.
| Plugin | Where links live | Branded short domain | Click analytics | QR codes |
|---|---|---|---|---|
| U2L AI | Your account (hosted) | Yes | Yes | Yes (dynamic) |
| Pretty Links | Your WordPress database | Your site's own domain | Yes | Yes |
| Bitly's WordPress Plugin | Your Bitly account (hosted) | Yes | In Bitly | In Bitly |
| ThirstyAffiliates | Your WordPress database | Your site's own domain | Yes | Not listed |
| BetterLinks | Your WordPress database | Yes (Pro) | Yes | Not listed |
There are two shapes here: plugins that store links locally in your WordPress database (Pretty Links, ThirstyAffiliates, BetterLinks) and plugins that create links on a hosted shortener (ours and Bitly's). Local storage keeps everything inside your site, which is lovely until a teammate who isn't a WordPress admin needs the links, or you migrate to a new site and want every link to keep working. Hosted links stay independent of WordPress, which is why a branded short domain on a hosted service tends to age best.
Our honest take: Pretty Links is the quiet default if you want local storage and you're happy sharing short links on your main domain (yourbrand.com/go/offer). Our plugin is the better fit if you want a dedicated short domain, dynamic QR codes next to the links, or you also share on social, email, and print, because every link lives in one dashboard with one set of analytics. Bitly's plugin makes sense mainly if you already pay for Bitly. ThirstyAffiliates wins on affiliate-specific workflows like cloaking and inserting links into content, but it's overkill for a general blog.
Which Plugin Fits Which Site?
A few rules of thumb, because none of this is one-size-fits-all:
Content-heavy blog, social-first distribution. You want hosted short links on a branded domain plus auto-shorten on publish. That's exactly what our plugin is built for.
Affiliate review site with hundreds of outbound links. You want local storage with cloaking, link insertion, and per-link settings. ThirstyAffiliates is the right tool here, and it isn't really competing with external shorteners.
Agency running a dozen client sites. You want each client's links on that client's branded domain without running a shortener on every site. A hosted account handles this well: connect each client's domain, keep their links in their own folder, and give your staff access through a team workspace.
Enterprise site with strict data residency. You want local storage for compliance reasons. A local plugin like BetterLinks or Pretty Links keeps every click inside your own infrastructure, which simplifies the data-processing conversation.
A site that also needs QR codes and bio pages. A hosted platform wins by default because it bundles those features. Any post you shorten with the plugin can also get a dynamic QR code or a spot on your bio page in the same dashboard. The full feature list is at u2l.ai/features.
Common Gotchas (and Fixes)
A short list of things that trip people up:
- The box says "Publish first." The plugin won't shorten a draft because the permalink can still change. Publish the post and the generate button appears.
- The API returns 401. Your key is wrong or revoked. Create a new one in the dashboard.
- Links aren't using the domain you expected. A blank Short domain field means automatic placement. Enter one of the domains connected to your account (your custom domain, for example) and every new link uses it.
- Auto-shorten didn't fire on a scheduled post. Scheduled posts go from "future" to "publish" when WP-Cron runs. If WP-Cron is disabled on your site, auto-shorten waits for your cron job; generating from the sidebar always works.
- Does deleting in WordPress delete the link in your account? Yes. The plugin calls
DELETE /api/v1/links/{domain}/{slug}and only clears the post meta after that succeeds. If the link was already deleted in the dashboard, it handles that quietly.
The plugin is a thin wrapper on our REST API, so for anything it doesn't do, our developer guide to URL shortener APIs walks through the endpoints with JavaScript, Python, and cURL. And before you auto-shorten a few hundred posts, the guide to custom short URLs covers naming patterns that stay readable at scale.
Frequently Asked Questions
What is the best WordPress URL shortener plugin?
It depends on where your links need to live. For hosted branded short links with QR codes and analytics in the same dashboard, our plugin is the fit. For links stored only in WordPress, Pretty Links is the long-running default, and ThirstyAffiliates covers affiliate workflows the general-purpose plugins don't.
Does WordPress have a built-in URL shortener?
Barely. WordPress exposes a ?p=POST_ID short URL by default, available to themes through the wp_get_shortlink() function. It isn't branded, isn't tracked, and isn't useful for sharing. A shortener plugin gives you a proper short link instead.
Do I need a paid account to use the plugin?
No. Every plan includes API access, the free plan too, so you can connect the plugin with a free account. Features like A/B testing, geo routing, and custom social previews live in the dashboard and apply to the same links.
Can I use my own domain for short links in WordPress?
Yes. Add your domain in the dashboard (one DNS record, automatic SSL), then enter it in the plugin's Short domain field under Settings → U2L AI. Every short link the plugin creates will use that domain.
Will the plugin change my permalinks or slow down my site?
No. The plugin only writes to post meta (_u2l_short_link) and makes a single API call when you click generate, or on first publish if auto-shorten is on. It doesn't run on the front end of your site and doesn't touch your permalink structure.
What happens to my short links if I uninstall the plugin?
They keep working, because they live in your account, not in WordPress. Uninstalling removes the plugin's settings (API key, short domain, auto-shorten) and the editor box; the short link saved on each post is kept.
Can I bulk-create short links for all my existing posts?
The plugin creates links one at a time from the sidebar, or automatically on first publish. For a batch of older posts, use bulk import in the dashboard or the API directly; our API guide shows the endpoints you'd script against.
Is the short link tied to the post or to the permalink?
To the permalink. When you generate, the plugin sends the current public permalink as the destination. If you later change the slug, update the destination in the dashboard - no new short link needed, so the URL you already shared keeps working.
Short Links Without Leaving the Editor
A WordPress URL shortener plugin earns its spot when it saves you the copy-paste dance on every post and keeps each link attached to the content it belongs to. Ours does that with one sidebar box, optional auto-shorten, and your own branded domain, while analytics, QR codes, and routing stay in one dashboard. Create a free U2L AI account, grab an API key, and your next post can publish with a short link already waiting.