這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Disable Media Permalink by Hardweb.it

外掛說明

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!

安裝方式

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

常見問題集

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.

使用者評論

2023 年 7 月 7 日
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.
2023 年 2 月 11 日
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!
2020 年 1 月 14 日
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!
2018 年 10 月 18 日
a great plugin, thank you! it was nos easy to find it!
閱讀全部 7 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈Disable Media Permalink by Hardweb.it〉的開發相關工作。

參與者

〈Disable Media Permalink by Hardweb.it〉外掛目前已有 1 個本地化語言版本。 感謝全部譯者為這個外掛做出的貢獻。

將〈Disable Media Permalink by Hardweb.it〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.0

  • First stable release