Upgrade for Unattach and Re-attach Media Attachments

Plugin Banner

Upgrade for Unattach and Re-attach Media Attachments

by laurencebahiirwa

Download
Description

WordPress allows to attach (or assign) images and other attachments organized within the Media Library to posts and pages.

A file will automatically be attached to a particular post when uploaded using the Add media button in that post. There are also “Attach” links in the Media Library to manually attach files to posts. Once attached there is no way to unattach or re-attach images, pdfs or any attachment in WordPress core.

This plugin fills this gap by providing two additional links next to “Attach” in the Media Library:

  • Re-Attach: Allows user to choose a new post to attach the media file.
  • Unattach: Totally removes an existing relation between an attachment and a post.

Bulk Actions

The plugin also provides bulk actions for unattaching and re-attaching multiple files at once! Just mark the files you want to change, select your desired action from the Bulk Actions dropdown and hit Apply.

Note

My initial issue came from here. Thanks to Unattach and Re-attach Media Attachments which inspired this plugin. Just adding upgrades of the code to the latter so it is safer for use and have fixed some bugs.

  1. Upload the plugin to the /wp-content/plugins/ directory or from the repository.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Refer to plugin description in regards to setting up how the plugins works
  4. It will work out of the box. Move to your media library and you can unattach and re-attach attachments to various posts.
  1. Bulk actions "Unattach" and "Re-Attach" in the Media Library

    Bulk actions "Unattach" and "Re-Attach" in the Media Library

  2. The extended "Parent" column in the Media Library

    The extended "Parent" column in the Media Library

  3. Individual actions "Unattach" and "Re-Attach" per post

    Individual actions "Unattach" and "Re-Attach" per post

How can I contribute?

You can raise lots of issues here and also make some Pull Requests through github

The only one to do a media attachment bulk action

By becaneweb on January 18, 2023

After a long search I finally found THE plugin to attach media quickly in wp.

Thank you !

It works perfectly

By danielepais on July 24, 2020

And it is very useful for bulk attach/unattach. Well done!

Bulk un-attachment doesn't work at all

By Nikola Dimitrijević (bukizvanipera) on August 28, 2020

On WP 5.3.2, bulk un-attachment doesn't work at all and there is no way to order media list by parent (page/post media file is attached to)

Lightweight and so useful

By DragoWeb (dragoeco) on February 8, 2020

I would have saved a lot of time if I had discovered this plugin earlier. It's lightweight and veeeery useful for me so, thanks a lot to the dev who created this 🙂

Works fine

By betagoo on June 27, 2019

Works fine.

Works great

By bombarulz2 on November 17, 2017

Works great, saved me a lot of time

Works magic. Just one little fix to do

By baggy4c on October 14, 2017

The plugin did as it suggested. Basic security measures taken care of so am not worried. However the options to attach and unattach appear in all bulk actions. It needs to be in the media section alone. Good work. Looking forward to bug fix.
Back to top