Recut
WORDPRESS PLUGIN

Shorten links directly from WordPress using shortcodes

Install our verified WP plugin or add a simple PHP function to your theme to start shortening links directly from WordPress using [shorturl] shortcodes.

Compatible with all WordPress themes & versions · Free plugin

WORDPRESS PLUGIN
Plugin Active
Shortcode Usage[shorturl]https://mysite.com[/shorturl]
Generated Shortlinkhttps://recut.in/wppost
Works with all themes & functions.php
WordPress Plugin

Shorten links in WordPress. Install our plugin or copy a simple functions.php shortcode.

Install our WP plugin and start shortening links directly from WordPress using a shortcode. All of your links will be automatically stored in your Recut account.

✓

Pre-Configured Plugin: Download recutshortener.zip, upload in WordPress Admin, and activate instantly.

✓

Works with All Themes: Add our lightweight cURL function to your child theme's functions.php.

✓

Inline Shortcodes: Use [shorturl]https://...[/shorturl] in posts, widgets, or HTML anchors.

Security Notice: Do not share this plugin or code with anyone you do not trust as they will have access to the full API and essentially your account.

Shortcode Syntax Preview
WordPress 5.0+
Shortcode Format:
[shorturl]https://google.com[/shorturl]
In HTML Anchor Tags:
<a href="[shorturl]https://google.com[/shorturl]">Google</a>
Works with Gutenberg, Elementor & Classic EditorReady

Choose your setup method. Install our verified plugin zip or paste our PHP function into functions.php.

Method 1

WordPress Plugin (No Configuration Needed)

You can easily use a shortcode to shorten links with our WordPress plugin. You just need to download it below and upload it in WordPress and that is it. There is no need to configure it as it will be already configured for you. All of your links will be saved in your account.

1Download the plugin file below named recutshortener.zip.
2Go to WordPress Admin > Plugins > Add New > Upload Plugin.
3Upload recutshortener.zip and activate it. The plugin will be named Recut Link Shortener Shortcode.
Method 2

WordPress Shortcode Function (functions.php)

If you don’t want to upload a plugin, you can use this method. It is very easy to setup and it works with all versions of WordPress and with any theme.

// This code simply registers the shortcode "shorturl". You can change it if you want something else
add_shortcode("shorturl", "pus_shortcode_shorten_url");

// Function to send the request
function pus_shortcode_shorten_url($atts, $content){
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://app.recut.in/api/url/add");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["url" => $content]));
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_HTTPHEADER, [
        "Authorization: Bearer YOUR_UNIQUE_API_KEY_HERE",
        "Content-Type: application/json"
    ]);
    $response = curl_exec($ch);
    curl_close($ch);
    $object = json_decode($response);
    if($object && isset($object->shorturl)){
        return $object->shorturl;
    }
    return $content;
}
1. Go to WordPress Admin > Appearance > Theme File Editor.
2. On the right side under Theme Files, find and click on Theme Functions (functions.php).
3. Paste the code above at the very end of the file and save. Get your API key from your account’s settings.

Ready to try Recut URL Shortener?

Join thousands of teams using Recut URL Shortener to create, share, and track links that drive results.

Free forever plan · No credit card required