WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Plugins» How to Easily Replace Image and Media Files in WordPress

How to Easily Replace Image and Media Files in WordPress

Last updated on March 11th, 2015 by Editorial Staff
38 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Easily Replace Image and Media Files in WordPress

Have you ever tried replacing an image that you uploaded in WordPress? If you did, then you probably had to upload a new file, rename it, and insert it into the post while replacing the old file. Now wouldn’t it be nice if you could do all of this with just few clicks? In this article, we will show you how to easily replace attachment files in WordPress.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

First thing you need to do is install and activate the Enable Media Replace plugin. Once activated, it works out of the box, and there are no settings for you to configure.

All you need to do is visit Media » Library in your WordPress admin area. If you are using the grid-view, then you would need to switch to the list view.

Now locate the file that you want to replace. Once you found the file, take your mouse near the file name, and you will see a link labeled ‘Replace Media’.

Replace media link in the media library

When you click on the link, it will take you to replace media page. There you need to upload your new file by clicking on the Choose File button.

Once you choose the file, you have two options that you can choose. You can choose to only replace the file, or you can replace the file, use new filename, and update all links pointing to the old file.

After choosing one of the options, simply press the upload button.

Replacing old file by uploading new media

WordPress will now upload your media file, and the plugin will replace the old media file. If you opted to use new filename and update links, then the plugin will take care of that as well.

You can now visit your posts or page where you had this media file attached and see it replaced with the new file you just uploaded.

We hope that this article helped you find an easier way to replace attachment files in WordPress.

If you just wanted to rename media files, then you may want to checkout our tutorial on how to easily rename images and media files in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Google+.

38 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Revealed: Why Building an Email List is so Important Today (6 Reasons)

    Revealed: Why Building an Email List is so Important Today (6 Reasons)

  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Start Your Own Podcast (Step by Step)

    How to Start Your Own Podcast (Step by Step)

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

26 Comments

Leave a Reply
  1. Jeff Vetterick says:
    Feb 24, 2021 at 8:17 pm

    If I use the plugin to just “replace image only” (with one of the same file name) will the alt text, image description, and image caption of the original image be overwritten or preserved. If they are preserved, this would save me a ton of time.

    Reply
    • WPBeginner Support says:
      Feb 25, 2021 at 10:22 am

      It should keep that information if it is able, you would want to reach out to the plugin’s support for specifics.

      Reply
  2. jg says:
    May 1, 2020 at 11:39 am

    This option isn’t available in the new version as it just allows you to delete or edit it. if I delete it I don’t know the url to replace it with?

    Reply
    • WPBeginner Support says:
      May 4, 2020 at 11:40 am

      You may want to ensure you are in the correct view for your media library as the feature is currently available

      Reply
  3. Sanjay Sajeev says:
    May 3, 2019 at 5:53 am

    Thank you for your post.

    I installed enable media replace plugin in my site. But when I replace an image that I used in a blog post, I can see the image has been replaced in the media library. But When I check that image in the blog post, there is no change to that image and its file size. What I have to do to resolve this?

    Reply
    • WPBeginner Support says:
      May 3, 2019 at 10:54 am

      You may want to try clearing your cache and if that does not work, reach out to the plugin’s support for them to take a look at possible issues.

      Reply
  4. Linda Joyce says:
    Jul 22, 2018 at 5:48 am

    Can I do the same thing manually by replacing the image via FTP? Will that change the image?

    Reply
    • WPBeginner Support says:
      Jul 22, 2018 at 9:59 am

      Hi Linda,

      That would work. But WordPress will not be able to regenerate thumbnails and image sizes.

      Reply
  5. Rehan says:
    May 23, 2018 at 9:08 pm

    Can I disable this plugin permanently after all images have been replaced in media library ?

    Reply
  6. Fede says:
    May 20, 2018 at 3:06 pm

    Hi. I keep getting request timeout. Same as when uploading using usual wp means. That is why I had to switch to uploading via ftp and then loading them through a plugin meant for that. I really need to get this working since some of the images are not scaling properly nd need to change them. Any help would be apreciated. Thanks.

    Reply
  7. hitesh says:
    Feb 10, 2018 at 1:49 am

    Hi

    in my wordpress admin there is no any option like replace media..in mine there are only 3 options 1) EDIT 2) DELETE PREMANENTLY 3) VIEW

    So what is the issue there ..its old version or have any other issue can u please clear that so that i can replace that media files

    Regards
    Hitesh

    Reply
    • Luke says:
      Feb 4, 2020 at 3:20 pm

      That’s why you need to install the mentioned plugin.

      Reply
  8. Nicole says:
    Jan 22, 2018 at 10:50 am

    Help

    I’m a perfrormer contacting agents and tried to replace voice reels after successfully installing yourplugin ( thought it was safest way to go )
    Now htey are blanks – I’ve cleared browsing cache

    I followed the instructions
    my media player is this :

    svnlabs HTML5 Mp3 player 3.6 installed

    please help :0

    Reply
  9. Riccardo says:
    Jan 22, 2018 at 6:37 am

    Hi thanks for the article, the plugin works great. There’s one thing I don’t get though: the image replacement seems to only affect the image in its original size, when the site displays the image in other formats (thumbnails, previews, etc…) I can still see the old image file.
    How can I force the image replacement on all the other image files (e.g. imagename-300×200.jpg)?
    thank you

    Reply
    • Rehan says:
      May 23, 2018 at 9:07 pm

      Please use Regenerate thumbnails plugin to regenerate your images. after that you will see the replaced images.

      Reply
  10. Leed says:
    Oct 24, 2017 at 3:57 pm

    Thanks a lot.
    You help me for this problem.

    Reply
  11. Panagiotis Tabakis says:
    Jan 12, 2017 at 11:27 am

    The Enable Media Replace plugin poses a security threat, I would totally avoid it. Its a shame to suggest users to use dangerous software. Please research before posting.

    The exploit holds since 2011.

    For more info see

    Reply
    • WPBeginner Support says:
      Jan 15, 2017 at 2:18 pm

      Hi Panagiotis,

      The issue was immediately resolved by the plugin author in the very next release (please see plugin’s changelog and scroll down to version 2.4).

      This is why we recommend users to keep their WordPress site and plugins updated.

      Reply
      • Panagiotis Tabakis says:
        Jan 15, 2017 at 2:46 pm

        Yes, you are correct. I’m sorry, I saw a support post which the plugin author didn’t answer and thought it wasn’t resolved.
        The exploit was patched @ 09 February 2011 (the same day).

        I wonder why the author hasn’t replied but I will inform the forum users.

        Again, sorry.

        Reply
        • WPBeginner Support says:
          Jan 17, 2017 at 4:25 pm

          No problem :) It’s good to be cautious about security issues. Hopefully, your answer on the support forums will help other users.

  12. Blake says:
    Nov 15, 2016 at 12:06 pm

    I am running WP 4.6.1 bootstrap and I want to remove a background photo and replace it with one that is in my galley. Can you tell me how to do it, Thanks

    Reply
  13. Sky says:
    Nov 1, 2016 at 7:19 pm

    I followed the steps and in the library the new image is displayed but where the image is located on the home page remains the old photo. Not sure what to do…

    Reply
    • Christian Scholz-Flöter says:
      Jul 23, 2017 at 3:16 pm

      Maybe it’s a browser cache related issue and you need to clean/delete the browser cache. If you don’t know how to do it, google your browser’s brand name and “clear browser cache”.

      Reply
  14. jorge says:
    Apr 5, 2016 at 1:37 pm

    This plugin works great in the media page. However I would like to also replace images/media from within the media modal window inside a post/page edit page without leaving the page. Any ideas?

    Thanks for this amazing post!

    Reply
  15. Marilyn says:
    Mar 17, 2016 at 1:09 pm

    I wish I had known this sooner! I didn’t detach my media files before I deleted them. I replaced them with a new image. The problem is that resulted in broken images. Even though I go back and reattach/choose the correct image down the road it breaks again. In my Easy recipe program I see the placeholder for the deleted image and the program searching for it. Is there a fix for this? Unfortunately there are about 200 files doing this.

    Reply
  16. Rosy says:
    Jan 12, 2016 at 7:11 pm

    Hi, unfortunately the “replace media” link is not showing as an option?

    Reply

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
TrustPulse
TrustPulse
Instantly get 15% more conversions with social proof. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
RingCentral Coupon Code
RingCentral Coupon
Get 34% OFF RingCentral, a popular VoIP and business communications solution.
WP Security Audit Log
WP Security Audit Log Coupon
Get 15% OFF on WP Security Audit Log WordPress activity log plugin.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.