DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk9 min

How to Get a Shortlink for a WordPress Post

Use Jetpack’s Shortlink panel, Classic Editor’s Get Shortlink button, or WordPress.com’s Action Bar to copy a compact WordPress URL. This guide also explains missing controls, core ?p= links, and developer functions.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The fastest way to get a WordPress shortlink is to open the post in the block editor, open the Jetpack panel, expand Shortlink, and click Copy. WordPress.com and Jetpack-connected sites copy a wp.me URL. In the Classic Editor, click Get Shortlink beside the permalink. If neither control appears, shortlink support may be disabled, unavailable, or supplied by no provider.

What a WordPress shortlink is

A WordPress shortlink is a compact URL that redirects to a post or page. On WordPress.com and Jetpack-powered sites, the address uses the wp.me domain. Jetpack describes these as links for sharing when a shorter address is useful; they are not general-purpose URL shorteners for arbitrary websites.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress core can also produce a compact query-style URL such as https://example.com/?p=123. That format is different from a wp.me link: it is generated from the site’s post ID and does not depend on the WP.me service.

Shortlinks are useful when a long permalink is awkward to type, display, or fit into a message. The destination remains the same post, so changing themes or editing the post title does not require you to replace a link that has already been shared.

Choose the workflow that matches your site

Where the post is hosted Editor or interface Shortlink format What you need
WordPress.com Block editor wp.me Jetpack panel in the editor
Self-hosted WordPress connected to Jetpack Block editor wp.me Jetpack connection and enabled WP.me shortlinks
Any site with the Classic Editor and a provider Classic Editor Provider-generated URL, commonly wp.me when Jetpack supplies it Get Shortlink must be available beside the permalink
WordPress.com while viewing a published item Action Bar wp.me Copy shortlink in the more-options menu
Core-only self-hosted WordPress Code or a theme template Usually ?p= style WordPress core shortlink support; a plugin can provide another format

If you only need a link to share right now, use the first workflow that matches your dashboard. If you are building a theme, plugin, or custom post type, use the developer functions described later.

Get a shortlink in the block editor

WordPress.com or a Jetpack-connected self-hosted site

  1. Sign in to the WordPress dashboard and open Posts. Open the published post whose shortlink you need. The same route works for a supported page.
  2. In the editor, click the Jetpack icon in the top-right corner. If the icon is not visible, make sure you are editing a site with Jetpack connected or using WordPress.com.
  3. Expand the Shortlink panel.
  4. Click Copy. The editor places the wp.me address on your clipboard.
  5. Paste the result into your message, document, social post, or browser address bar to verify that it points to the intended item.

The copied address is a redirecting WP.me URL, not the full permalink shown in your site’s address structure. Keep the shortlink when the recipient needs a compact address; use the regular permalink when showing your site’s domain is more important.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When the post is not yet published

The documented workflows are centered on a published post or page. If you are still drafting, save or publish the item first, then reopen it and look for Shortlink. A link generated before publication may not be available through the same interface.

Use the Classic Editor’s Get Shortlink button

  1. Open the published post in the Classic Editor.
  2. Look beneath the title, beside the permalink.
  3. Click Get Shortlink.
  4. Copy the URL shown in the dialog.

The button is conditional rather than guaranteed. Current WordPress administration code renders it only when a shortlink provider or filter is present and the generated shortlink differs from the post’s normal permalink. Therefore, a missing button does not by itself indicate a damaged post or editor. It usually means that no provider is available, shortlinks were disabled, or the generated value is the same as the permalink.

Copy a shortlink from the WordPress.com Action Bar

When viewing a published post or page on WordPress.com, use the Action Bar:

  1. Open the published post or page on the public site while signed in.
  2. Open the Action Bar’s more-options menu.
  3. Choose Copy shortlink.
  4. Paste the copied address where you need it.

This route is convenient when you are already viewing the public page instead of working inside the editor.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why the Shortlink or Get Shortlink control is missing

Jetpack is not connected on a self-hosted site

On a self-hosted installation, WP.me links are supplied through Jetpack. Install and connect Jetpack, then check its Traffic settings. The relevant option is Jetpack → Settings → Traffic → Create short and simple links for all posts and pages. Once support is available and enabled, reopen the post and check the editor panel or Classic Editor.

WP.me shortlinks are disabled by the site’s plan settings

WordPress.com support documentation reviewed September 28, 2026 states that every WordPress.com page and post has a WP.me shortlink. On Business and Commerce plans, administrators can toggle WP.me Shortlinks under Jetpack → Settings → Traffic. Free, Personal, and Premium plans keep the feature active and do not expose that toggle. If the feature is disabled on a Business or Commerce site, existing shared WP.me links continue redirecting even after the setting is turned off.

No provider supplies a shortlink

WordPress core documents that wp_get_shortlink() returns an empty string when no shortlink exists. A site can therefore have a perfectly normal post but no shortlink control because nothing is generating one.

The generated link is not different from the permalink

The Classic Editor control is shown only when the provider returns a link that differs from the regular permalink. If both values are effectively the same, WordPress has no separate compact address to display.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You are editing an unsupported content type

Jetpack provides WP.me support for the standard post, page, and attachment post types by default. A custom post type may need explicit shortlinks support; the code example below shows how to add it.

WordPress.com, Jetpack, and core-only links compared

Approach Hosting context Typical URL Interface Code customization
WordPress.com shortlink WordPress.com site wp.me Jetpack panel or Action Bar Usually unnecessary for routine copying
Jetpack shortlink Self-hosted site connected to Jetpack wp.me Jetpack panel; Classic Editor may show Get Shortlink Jetpack and WordPress hooks can be used
Core fallback Self-hosted WordPress without a provider https://example.com/?p=123 No WP.me button is guaranteed Use wp_get_shortlink(), filters, or a provider plugin

The choice is mainly about the URL format and who generates it. A wp.me address comes from WordPress.com or Jetpack. Core’s fallback is a query URL based on the site’s own domain and post ID.

Get a core shortlink with PHP

Retrieve the URL with wp_get_shortlink()

WordPress exposes this function for code that needs the URL itself:

<?php
$shortlink = wp_get_shortlink();

if ( $shortlink ) {
    echo esc_url( $shortlink );
}
?>

wp_get_shortlink( $id = 0, $context = 'post', $allow_slugs = true ) accepts an optional object ID, context, and slug allowance. With the default arguments, it asks WordPress for the shortlink associated with the current post context. The function can return a link for a post, page, attachment, or site, depending on the context and available provider.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

WordPress says its default support is limited to ?p=-style links. Plugins can provide or filter other formats, including a service-generated short URL.

Display it with the_shortlink()

Inside The Loop, use the_shortlink() when you want WordPress to output an anchor containing the shortlink:

<?php
if ( get_shortlink() ) {
    the_shortlink( 'Copy shortlink' );
}
?>

The key distinction is output versus return value. WordPress documents that the_shortlink() displays the complete link and must be called from inside The Loop, while wp_get_shortlink() returns the URL for code that needs to handle it. In a custom template, confirm that the call runs in the correct post context before adding markup around it.

Support shortlinks for a custom post type

Jetpack’s developer documentation lists post, page, and attachment as receiving WP.me support by default. Add support to a custom post type in either of these ways:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<?php
add_post_type_support( 'custom_post_type', 'shortlinks' );
?>

Or include shortlinks in the post type’s registered supports array:

<?php
register_post_type(
    'custom_post_type',
    array(
        'supports' => array( 'title', 'editor', 'shortlinks' ),
    )
);
?>

Replace custom_post_type with the actual post type key. The post type still needs a provider capable of generating a shortlink; declaring support does not create a WP.me service on its own.

Customize generation with filters

Use pre_get_shortlink when a plugin needs to short-circuit generation and return its own value before the normal process runs. Use get_shortlink when you need to modify the generated URL:

<?php
add_filter( 'pre_get_shortlink', function ( $return, $id, $context, $allow_slugs ) {
    // Return a URL here to bypass the normal shortlink process.
    return $return;
}, 10, 4 );

add_filter( 'get_shortlink', function ( $shortlink, $id, $context, $allow_slugs ) {
    // Adjust or replace the generated URL here.
    return $shortlink;
}, 10, 4 );
?>

These hooks are appropriate for plugin-level integration, not for a one-off copy operation. Keep the callback’s return value a valid URL or an empty value when no shortlink should be offered. Test the result in both the editor and any template that calls a shortlink function.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot a missing or incorrect shortlink

  • Confirm the hosting context: determine whether the site is WordPress.com, self-hosted with Jetpack, or core-only. The available URL format depends on this distinction.
  • Open a published item: use a published post or page, then reopen the editor. The documented copy controls are tied to published content.
  • Check the correct panel: in the block editor, look for the Jetpack icon in the top-right, then expand Shortlink.
  • Check Traffic settings: on a self-hosted Jetpack site, verify Create short and simple links for all posts and pages. On WordPress.com Business or Commerce, check the WP.me Shortlinks toggle.
  • Look beside the permalink in Classic Editor: the button is named Get Shortlink, not “Short URL” or “Copy URL.”
  • Check the content type: standard posts, pages, and attachments have Jetpack support by default; custom post types may require the shortlinks support declaration.
  • Inspect the returned value: if wp_get_shortlink() returns an empty string, WordPress has no available shortlink provider for that request.
  • Distinguish formats: wp.me indicates WordPress.com or Jetpack generation; ?p=123 is the normal core-style fallback.
  • Test the copied destination: paste the URL into a browser and confirm that it redirects to the intended post, especially when multiple posts have similar titles.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common mistakes to avoid

Confusing the permalink with the shortlink

The permalink is the post’s normal public address, often containing a readable slug. A shortlink is a separate compact address. Copying the browser address bar may give you the permalink even when a WP.me shortlink is available in the editor.

Assuming every WordPress installation has WP.me

WP.me is associated with WordPress.com and Jetpack. A self-hosted site without Jetpack or another provider can still have a core ?p= URL, but it should not be expected to produce a wp.me address.

Searching for a button that is intentionally conditional

The Classic Editor’s Get Shortlink button appears only when a provider or filter supplies a distinct shortlink. Its absence is therefore a configuration or provider signal, not evidence that the post failed to save.

Disabling WP.me and assuming old links stop working

According to WordPress.com support, existing shared WP.me links continue redirecting after WP.me Shortlinks are disabled on plans that expose the setting. Disabling the feature affects availability for new use; it does not invalidate those already shared links.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which method should you use?

  • Need one link with no code? Use the block editor’s Jetpack panel and click Copy.
  • Working in the Classic Editor? Click Get Shortlink beside the permalink when the button is present.
  • Already viewing a WordPress.com page? Use Action Bar → more options → Copy shortlink.
  • Running core-only WordPress? Call wp_get_shortlink(); expect a ?p= fallback unless a plugin supplies another format.
  • Building a theme or plugin? Use wp_get_shortlink() when your code needs the URL and the_shortlink() inside The Loop when your template should print an anchor.
  • Supporting a custom post type? Add shortlinks support and ensure a provider is active.

Frequently asked questions

Where is the Get Shortlink button in WordPress?

In the Classic Editor, it appears beside the permalink beneath the post title. It is shown only when a shortlink provider or filter supplies a distinct URL.

How do I copy a wp.me link?

Open the post in the block editor, click the Jetpack icon, expand Shortlink, and click Copy. On WordPress.com, the Action Bar’s more-options menu also includes Copy shortlink.

Can I get a WordPress short URL without Jetpack?

You can get WordPress core’s query-style shortlink, commonly https://example.com/?p=123, through wp_get_shortlink(). A wp.me link specifically requires WordPress.com or Jetpack support.

Why does wp_get_shortlink() return an empty value?

Core returns an empty string when no shortlink exists for the request. Check whether a provider is active, whether the post type supports shortlinks, and whether a filter is returning an empty value.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.