Title: Disable Media Permalink by Hardweb.it
Author: giangel84
Published: <strong>16, Mayu de 2018</strong>
Last modified: 4, Marzu de 2026

---

Guetar plugins

![](https://ps.w.org/disable-media-permalink-by-hardweb-it/assets/banner-772x250.
png?rev=3474690)

![](https://ps.w.org/disable-media-permalink-by-hardweb-it/assets/icon-256x256.jpg?
rev=3474698)

# Disable Media Permalink by Hardweb.it

 By [giangel84](https://profiles.wordpress.org/giangel84/)

[Download](https://downloads.wordpress.org/plugin/disable-media-permalink-by-hardweb-it.1.0.zip)

 * [Details](https://ast.wordpress.org/plugins/disable-media-permalink-by-hardweb-it/#description)
 * [Reviews](https://ast.wordpress.org/plugins/disable-media-permalink-by-hardweb-it/#reviews)
 *  [Installation](https://ast.wordpress.org/plugins/disable-media-permalink-by-hardweb-it/#installation)
 * [Development](https://ast.wordpress.org/plugins/disable-media-permalink-by-hardweb-it/#developers)

 [Support](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/)

## Description

Completely disable the Media Permalink generated by WP.
 It’s useful for websites
who doesn’t need the attachment’s page, it reduce Cookiebot crawled pages and more
over. It’s easy to use, no options, just activate the plugin and it will work as
expected.

### Donate

If you like this plugin and want to support my work, you can make a donation at 
this address: https://www.paypal.com/donate?hosted_button_id=DEFQGNU2RNQ4Y – Thank
you very much!

## Installation

 * Install the Plugin and Activate it.
 * No settings required, read the F.A.Q. to know how it work!
 * That’s all! Enjoy.

## FAQ

### How it works?

When the Plugin is active, it apply a filter to say to your WP to disable all media
permalinks.
 So every link like this: https://mydomain.com/category/the-post-title/
attachment/my-image-slug come back to: https://mydomain.com/wp-content/uploads/12/
01/my-image.jpg

### What happen when a previous permalink will open?

Since WP will no longer check these type of guid structure the old permalink will
return a 404 page.

### Is this plugin SEO compatible?

Obviously if you disable all media permalink, all of those could be deleted by search
engines.
 Depend on your SEO plugin, it could convert all media permalink to the
direct file link (see your SEO plugin settings and check the sitemap.xml to understand
what it contain). If you enable the “Redirect attachment URLs to the attachment 
itself” function, this will stop to work, since the redirect can’t work without 
the media permalink.

### Do the plugin something with database?

No! The plugin never write anything to your wordpress database, so it is 100% safe
to use!

### Can I restore all media permalink?

Of course, You can do it with a single click!
 * Simply disable or uninstall the
plugin * Your permalink structure and all previous permalink will work again.

## Reviews

![](https://secure.gravatar.com/avatar/e29533544cd0ccbf6d11c8322e992a49d79abfd0287f3f9adb5d78201afb4f08?
s=60&d=retro&r=g)

### 󠀁[Just hides the URL doesn’t disable it](https://wordpress.org/support/topic/just-hides-the-url-doesnt-disable-it/)󠁿

 [David Brown](https://profiles.wordpress.org/davidhbrown/) 7, Xunetu de 2023

This plug-in disables the generation of the HTML of the media permalink within a
page. It does not disable the underlying functionality where, e.g., /wp-content/
uploads/2023/07/nonpublic.pdf might become accessible as an automatically generated
link in the page at /nonpublic/ (an "attachment post"). (I've already restricted
access to wp-content/uploads using mod_rewrite to require a HTTP_REFERER from the
same site; this allows me to allow links only when I create them on private pages.
Except that there's no way in the UI to set an attachment post to private, so I 
want to get rid of them entirely. Perhaps I can do that by mangling image.php in
the theme.) The code itself is very nicely concise and easy to understand and confirm
it's not a security threat, so I'm leaving half stars for that, but at least for
me, it's just a security-through-obscurity solution to the underlying issue of attachment
posts for media.

![](https://secure.gravatar.com/avatar/68742ac31d0f215d5593e1ce48855edd15b8caf154a0dc6f0449ab85b9fb5d6d?
s=60&d=retro&r=g)

### 󠀁[This Worked When Nothing Else Did! Thank You!](https://wordpress.org/support/topic/this-worked-when-nothing-else-did-thank-you/)󠁿

 [thatgrrl](https://profiles.wordpress.org/thatgrrl/) 11, Febreru de 2023

Something caused all the media/ image links on the site to be broken. I noticed 
the permalinks were not the same as the file links. But, I could find nothing that
would let me change the permalinks. With over 500 images I did not want to go through
and fix them one by one. Plus, I just hate the new WordPress block editor. It drives
me crazy just to add any content at all. So, fixing more than 500 image links was
far more than I wanted to do. I managed to fix one but it took several minutes for
just that one. I tried various other plugins to do with after migrating a site and…
I don't even remember what else now. I tried at least half a dozen different things
and nothing worked. I was about to give up. I tried one more search in plugins for
something that would help and I found "Disable Media Permalinks". I didn't think
it would work. I read the FAQ, not really 100% understanding it. But, I thought 
I didn't have much to lose at that point. If it didn't work I would be no better
or worse off, in theory. But… it did work!!! Perfectly, and easily. I only had to
install it, then save the settings (without making any changes) to Settings>Media.
I checked the media library and the images were back!!! Not just there but in all
the posts on the live site too. Thank you so much for this plugin! How wonderful
to find such an easy fix for a problem with WordPress. Thank you, again!

![](https://secure.gravatar.com/avatar/1fe658418322f9cfae4bbadabd9f6c27ad224ee7eb39a152cb3d29bbf665b07b?
s=60&d=retro&r=g)

### 󠀁[Didn’t work for me](https://wordpress.org/support/topic/didnt-work-for-me-169/)󠁿

 [Morphy99](https://profiles.wordpress.org/morphy99/) 23, Marzu de 2021

Installed and activated yet my media permalinks are still loading

![](https://secure.gravatar.com/avatar/0750c31ad2e4acbd1e971a549974bf676de83ffafccd57e2dd7e2139fdd9e88d?
s=60&d=retro&r=g)

### 󠀁[Excellent and simple](https://wordpress.org/support/topic/excellent-and-simple-30/)󠁿

 [Jose Mortellaro](https://profiles.wordpress.org/giuse/) 14, Xineru de 2020

This plugin is perfect. You have just to install it to solve a big problem. Thank
you for giving the possibility to disable the media permalinks created by WordPress
just with one click!

![](https://secure.gravatar.com/avatar/7fa7284cfb0c991b6d53e58b4158b1f2a89387e1f7c7f1ba1660fdbd351e3d36?
s=60&d=retro&r=g)

### 󠀁[Great plugin! Fixed media permalink problem instantly](https://wordpress.org/support/topic/great-plugin-fixed-media-permalink-problem-instantly/)󠁿

 [altworks](https://profiles.wordpress.org/altworks/) 1, Mayu de 2019

The simplest and most effective way to get rid of annoying media permalinks and 
the garbage pages they create. I'm very happy to find this!

![](https://secure.gravatar.com/avatar/cddf8e0970fea9c05813e0e8c5aa2196d924400e26d7c7ec00fcf202857adfff?
s=60&d=retro&r=g)

### 󠀁[great plugin](https://wordpress.org/support/topic/great-plugin-19524/)󠁿

 [Giulian](https://profiles.wordpress.org/giulian/) 18, Ochobre de 2018

a great plugin, thank you! it was nos easy to find it!

 [ Read all 7 reviews ](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/)

## Contributors & Developers

“Disable Media Permalink by Hardweb.it” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ giangel84 ](https://profiles.wordpress.org/giangel84/)

“Disable Media Permalink by Hardweb.it” has been translated into 1 locale. Thank
you to [the translators](https://translate.wordpress.org/projects/wp-plugins/disable-media-permalink-by-hardweb-it/contributors)
for their contributions.

[Translate “Disable Media Permalink by Hardweb.it” into your language.](https://translate.wordpress.org/projects/wp-plugins/disable-media-permalink-by-hardweb-it)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/disable-media-permalink-by-hardweb-it/),
check out the [SVN repository](https://plugins.svn.wordpress.org/disable-media-permalink-by-hardweb-it/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/disable-media-permalink-by-hardweb-it/)
by [RSS](https://plugins.trac.wordpress.org/log/disable-media-permalink-by-hardweb-it/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0

 * First stable release

## Meta

 *  Version **1.0**
 *  Last updated **7 meses ago**
 *  Active installations **900+**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **6.9.10**
 *  PHP version ** 7.4 or higher **
 *  Languages
 * [English (US)](https://wordpress.org/plugins/disable-media-permalink-by-hardweb-it/)
   y [Italian](https://it.wordpress.org/plugins/disable-media-permalink-by-hardweb-it/).
 *  [Translate into your language](https://translate.wordpress.org/projects/wp-plugins/disable-media-permalink-by-hardweb-it)
 * Tags
 * [attachment](https://ast.wordpress.org/plugins/tags/attachment/)[images](https://ast.wordpress.org/plugins/tags/images/)
   [media](https://ast.wordpress.org/plugins/tags/media/)[permalink](https://ast.wordpress.org/plugins/tags/permalink/)
   [remove url](https://ast.wordpress.org/plugins/tags/remove-url/)
 *  [Advanced View](https://ast.wordpress.org/plugins/disable-media-permalink-by-hardweb-it/advanced/)

## Ratings

 4.1 out of 5 stars.

 *  [  5 5-star reviews     ](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/?filter=4)
 *  [  1 3-star review     ](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/reviews/)

## Contributors

 *   [ giangel84 ](https://profiles.wordpress.org/giangel84/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/disable-media-permalink-by-hardweb-it/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/donate?hosted_button_id=DEFQGNU2RNQ4Y)