{"id":12595,"date":"2011-03-19T21:53:29","date_gmt":"2011-03-19T21:53:29","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/overwrite-uploads\/"},"modified":"2025-08-04T16:18:37","modified_gmt":"2025-08-04T16:18:37","slug":"overwrite-uploads","status":"publish","type":"plugin","link":"https:\/\/szl.wordpress.org\/plugins\/overwrite-uploads\/","author":33690,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2.2","stable_tag":"1.2.2","tested":"6.8.5","requires":"2.9","requires_php":"","requires_plugins":null,"header_name":"Overwrite Uploads","header_author":"Ian Dunn","header_description":"","assets_banners_color":"","last_updated":"2025-08-04 16:18:37","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/kiva.org","header_plugin_uri":"","header_author_uri":"http:\/\/iandunn.name","rating":3.4,"author_block_rating":0,"active_installs":1000,"downloads":60968,"num_ratings":8,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0":{"tag":"1.0","author":"iandunn","date":"2011-03-20 01:34:06"},"1.0.1":{"tag":"1.0.1","author":"iandunn","date":"2011-08-14 18:36:39"},"1.0.2":{"tag":"1.0.2","author":"iandunn","date":"2012-01-13 06:39:53"},"1.1":{"tag":"1.1","author":"iandunn","date":"2015-04-17 13:04:32"},"1.2":{"tag":"1.2","author":"iandunn","date":"2020-12-09 15:32:17"},"1.2.2":{"tag":"1.2.2","author":"iandunn","date":"2025-08-04 16:18:37"}},"upgrade_notice":{"1.2.2":"<p>Version 1.2.2 fixes a security bug where Author accounts could overwrite media created by editors and administrators.<\/p>","1.2":"<p>Version 1.2 adds support for sideloaded images, and fixes a bug when handling files with spaces and other non-standard characters in the name.<\/p>","1.1":"<p>Overwrite Uploads 1.1 now works without having to modify WordPress Core files<\/p>","1.0.2":"<p>Overwrite Uploads 1.0.2 fixes a bug where old Media Library entries weren&#039;t deleted.<\/p>","1.0.1":"<p>Overwrite Uploads 1.0.1 adds support for network-side activation on WordPress MultiSite installations<\/p>","1.0":"<p>Initial release<\/p>"},"ratings":{"1":3,"2":0,"3":0,"4":1,"5":4},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.1","1.2","1.2.2"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[88,233,22037,536,85],"plugin_category":[50],"plugin_contributors":[77535],"plugin_business_model":[],"class_list":["post-12595","plugin","type-plugin","status-publish","hentry","plugin_tags-files","plugin_tags-media-library","plugin_tags-overwrite","plugin_tags-unique","plugin_tags-uploads","plugin_category-media","plugin_contributors-iandunn","plugin_committers-iandunn"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/overwrite-uploads.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>By default WordPress doesn't overwrite an existing file if you upload a new one with the same name and directory. Instead, it appends a number to the end of the filename in order to make it unique, <em>e.g., <code>filename.jpg<\/code> becomes <code>filename1.jpg<\/code><\/em>.<\/p>\n\n<p>That isn't always the desired behavior, so this plugin makes it so that any files uploaded will automatically overwrite existing files <strong>in the same folder<\/strong>, rather than creating a second file with a unique name. It will not overwrite files in other folders.<\/p>\n\n<p>After activating the plugin, you won't need to do anything else, it'll start working automatically. If you run into problems, please check the FAQ and existing support forum posts before opening a new support request.<\/p>\n\n<!--section=installation-->\n<p>For help installing this (or any other) WordPress plugin, please read the <a href=\"http:\/\/codex.wordpress.org\/Managing_Plugins\">Managing Plugins<\/a> article on the Codex.<\/p>\n\n<p>Once the plugin is installed and activated, it will start to work automatically.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='why%20do%20i%20see%20multiple%20copies%20of%20the%20file%20in%20the%20media%20library'><h3>Why do I see multiple copies of the file in the Media Library<\/h3><\/dt>\n<dd><p>WordPress allows files to have the same name if they're not in the same directory. So, <code>wp-content\/uploads\/2013\/11\/pizza.jpg<\/code> can live alongside <code>wp-content\/uploads\/2013\/12\/pizza.jpg<\/code>. This plugin only deletes existing files if they are in the same folder that the new file will be placed in.<\/p>\n\n<p>Also, only Editor and Administrator accounts can overwrite the uploads of other users. You can customize this behavior using the <code>ovup_can_overwrite_upload<\/code> filter.<\/p><\/dd>\n<dt id='can%20i%20make%20a%20donation%20to%20support%20the%20plugin%3F'><h3>Can I make a donation to support the plugin?<\/h3><\/dt>\n<dd><p>I do this as a way to give back to the WordPress community, so I don't want to take any donations, but if you'd like to give something I'd encourage you to make a microloan with <a href=\"http:\/\/www.kiva.org\">Kiva<\/a>.<\/p><\/dd>\n<dt id='do%20you%20support%20this%20plugin%3F'><h3>Do you support this plugin?<\/h3><\/dt>\n<dd><p>I'm happy to fix reproducible bugs, but I don't have time to help you customize the plugin to fit your specific needs.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.2 (2017-04-01)<\/h4>\n\n<ul>\n<li>[SECURITY] Fix a bug where Author accounts could overwrite media created by editors and administrators. If desired, the previous behavior can be restored using the <code>ovup_can_overwrite_upload<\/code> filter. Props <a href=\"https:\/\/hackerone.com\/phycox69\">phycox69<\/a>.<\/li>\n<\/ul>\n\n<h4>1.2 (2017-04-01)<\/h4>\n\n<ul>\n<li>[NEW] Added support for sideloaded images (typically done by plugins), in addition to regular manual uploads. Props wayneallen-1<\/li>\n<li>[FIX] Filenames with spaces and other non-standard characters are now overwritten. Props ascottmccauley<\/li>\n<\/ul>\n\n<h4>1.1 (2013-12-14)<\/h4>\n\n<ul>\n<li>[NEW] Delete existing attachments before a new one is uploaded. This avoids the need to modify WordPress core files.<\/li>\n<li>[UPDATE] General code cleanup and modernization<\/li>\n<li>[UPDATE] Removed unnecessary debugging method, activation logic and admin notices support<\/li>\n<li>[UPDATE] Moved requirements check into bootstrap script<\/li>\n<li>[UPDATE] Moved overwrite-uploads.php into classes directory<\/li>\n<li>[UPDATE] Fixed improperly capitalized overwriteUploads class name<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Fixed bug where old Media Library entries weren't removed if the 'Organize my uploads into year and month folders' setting was enabled.<\/li>\n<li>Setting removed because it's unnecessary. Plugin will overwrite uploads if activated, and won't if it isn't.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Added network-wide activation for WPMS blogs<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Overwrites files with the same name and folder when uploading, instead of storing multiple copies with unique filenames.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/12595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=12595"}],"author":[{"embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/iandunn"}],"wp:attachment":[{"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=12595"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=12595"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=12595"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=12595"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=12595"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/szl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=12595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}