Media Library – replacing items beware

You may have found that deleting an image or other item in the Media Library before uploading a replacement with the same name is an effective way to update the image (or PDF etc.). This only works if the item being deleted was originally added in the same calendar month so is not recommended if you are not sure when the original was added.

Under the covers the Media library uses a new folder every month and this changes the reference (URL) of the item. So if an item uploaded last month or earlier is deleted and an item with the same name is uploaded then any pages showing the item will have broken links.

If you do this by mistake check all is OK. Do this by viewing the pages referencing the items and do a hard refresh on your browser (usually F5 with the shift key held down). If necessary amend the references by Replace > Open Media Library for images or for links (e.g. to a PDF) paste or locate the new URL.

If you do this a lot then a number of SiteWorks sites have installed the plugin Enable Media Replace that takes care of things so you don’t need to edit pages or posts that reference the item. Remember to try this plugin on Local WP first before installing on you production SiteWorks site.