« Back to Add-on Library

Short Links

Short Links
Short Links is a URL management solution that generates custom WordPress endpoints for easy-to-remember, shareable short links. Create branded short URLs that automatically redirect to any destination with a simple admin interface and optional debug logging for tracking and troubleshooting.

### Key Features

-
Custom URL Endpoints - Create memorable short URL slugs that redirect automatically
-
Admin Settings Manager - Intuitive table interface to manage all short links
-
Rewrite Rule Integration - Automatic WordPress permalink structure management
-
URL Validation - Automatic slug sanitization and destination validation
-
Debug Logging - Optional logging to track short link access
-
Quick Testing - Built-in "Test" button to verify links work correctly
-
Copy Functionality - One-click clipboard copy for easy sharing
-
Bulk Management - Add, edit, and remove multiple links

### Admin Interface Components

-
Settings Page - Clean admin interface under CWP Snippets menu
-
Short Links Table - Sortable table showing all endpoints
-
Quick Actions - Test, copy, and remove buttons for each link
-
Debug Logging Toggle - Enable/disable logging with AJAX auto-save
-
Add New - Button to add additional short link rows
-
Instructions Section - Built-in setup and usage documentation
-
Field Guidelines - Help text for proper slug and URL formatting

### Requirements

✓ WordPress 5.8 or higher
✓ CWP Snippets plugin installed
✓ PHP 7.4 or higher
✓ Permalink structure enabled (not plain)

### How It Works

1.
Create Endpoint - Enter a memorable slug (e.g., "promo2026")
2.
Set Destination - Provide the full URL to redirect to
3.
Save Settings - Store in WordPress options table
4.
Add Rewrite Rule - Automatically creates WordPress endpoint
5.
Test Link - Verify redirect works before sharing
6.
Share - Distribute short link via social media, email, or print

### Features in Detail

Custom Endpoints
- Create unlimited short links
- 301 permanent redirects to preserve SEO
- Internal or external destination support
- No query parameters or tracking codes required

Admin Management
- View all short links in organized table
- Edit any link at any time
- Delete unused links to keep organized
- Bulk actions for multiple links

URL Features
- Automatic slug sanitization (lowercase, letters/numbers/hyphens only)
- Full destination URL validation
- 301 redirects for SEO best practices
- Error handling for missing links (404 responses)

Debug Logging
- Optional access logging to CWP error log
- Track when short links are used
- Monitor redirect performance
- Enable/disable with toggle switch

Rewrite Rules
- Automatic rule generation per short link
- Proper WordPress hook integration
- Flush management for permalink updates
- Query variable registration

### Security Features

- Admin capability checks (manage_options required)
- Nonce verification on AJAX operations
- URL validation and sanitization
- Prepared database statements
- Escaped output in admin interface
- XSS protection on user input

### Ideal For

- Social media link sharing
- Email marketing campaigns
- QR code generation
- Event promotion and registration
- Marketing campaign tracking
- Brand consistency across channels
- Document distribution
- Affiliate link management

### What's Included

✓ Short link endpoint creation and management
✓ Admin settings page with table interface
✓ Rewrite rule management
✓ URL validation and sanitization
✓ Copy to clipboard functionality
✓ Debug logging system
✓ Test link verification button
✓ Built-in help and documentation
✓ Responsive mobile-friendly interface
✓ AJAX settings updates

---

Complete URL management solution for creating branded short links and custom WordPress endpoints with professional admin interface and optional access logging.

Downloads