WP Manifestindependent plugin directory
manifest / seo / media-slug-prefix-control

Media Slug Prefix Control

Add new WordPress configuration permanent link for midias

★ 0stars
v1.0.0latest · 9mo ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/linknacional/media-slug-prefix-control/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Prevent slug conflicts between WordPress Pages and Media Attachments by adding a custom prefix to attachment URLs.

🛑 The Problem

By default, when you upload an image named contact.jpg to WordPress, the system creates an attachment page with the slug /contact/.

If you later try to create a Page named "Contact", WordPress will force the URL to become /contact-2/ because /contact/ is already taken by the image. This is frustrating for site architecture and SEO.

✅ The Solution

Media Slug Prefix Control solves this by virtually moving all media attachments to a sub-path (e.g., /media/ or /assets/).

  • Before: https://example.com/contact/ (Image takes the slot)
  • After: https://example.com/media/contact/ (Image moves here)

Now, the slug https://example.com/contact/ is free to be used by your actual Pages or Posts.

✨ Features

  • Custom Prefix: Define any base slug you want via the admin panel (e.g., media, assets, images).
  • Conflict Resolver: Automatically allows Pages/Posts to "steal" the slug back from attachments if the attachment is using the custom prefix.
  • SEO Friendly: Automatically adds 301 Redirects from old attachment URLs to the new prefixed URLs.
  • Native Integration: Adds a setting field directly to Settings > Permalinks.
  • Retroactive: Works for both new uploads and existing images.

🚀 Installation

Manual Installation

  1. Download the repository as a ZIP file.
  2. Go to your WordPress Dashboard: Plugins > Add New > Upload Plugin.
  3. Upload the ZIP and activate the plugin.

via FTP/Git

  1. Clone this repository into your wp-content/plugins/ directory:
    
    git clone [https://github.com/seu-usuario/media-slug-prefix-control.git](https://github.com/seu-usuario/media-slug-prefix-control.git)

Releases

1 release.

Tag
Published
v1.0.0 latest
Jan 16, 2026 9mo ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.