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» Beginners Guide» Where Does WordPress Store Images on Your Site?

Where Does WordPress Store Images on Your Site?

Last updated on March 31st, 2016 by Editorial Staff
370 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
Where Does WordPress Store Images on Your Site?

Are you wondering where does WordPress store images on your website? Many beginners users have asked us how does WordPress store images and what they can do to organize their media library more effectively. In this article, we will explain how WordPress stores images on your site.

Where does WordPress store images on your site

How Does WordPress Store Images?

WordPress comes with a built-in system to manage your media uploads like images, videos, music, documents, etc. This system allows you to upload, manage, edit, and delete files from your WordPress media library.

Media Library view in WordPress admin area

By default, WordPress stores all your images and media uploads in /wp-content/uploads/ folder on your server. All uploads are organized in a month and year based folders.

For example, all your media files uploaded in in March 2016 will be stored in:

/wp-content/uploads/2016/03/

You can view these folders by connecting to your WordPress site using an FTP client.

FTP view of uploads directory of a WordPress site

WordPress also adds information about your image uploads in the database. Information about your uploads is stored in database as a attachment post type under the posts table.

Database entry for attachment post type as seen in phpMyAdmin

WordPress also saves information in posts meta table when you insert images into posts/pages or any other custom post type.

When you set featured image also known as thumbnails, WordPress saves this information as a meta key _thumbnail_id and stores it in the postmeta table of your database.

Thumbnail ID meta key stored in postmeta table

Deleting your files from server using an FTP client will remove them from your server, but it will not remove them from the WordPress database. Those images will continue to appear on your WordPress site as broken images.

Similarly, if you delete references to your images and media uploads from database, then WordPress will stop showing them in the Media library. Even if all your images are intact and stored on your server.

Changing How WordPress Stores Images and Media Uploads

By default, WordPress does not allow you to change the uploads location from WordPress admin area. The only change you can make is to disable the month and year based folders by visiting Settings » Media page.

Organizing uploads in months and year based folders

Simply uncheck the box next to ‘Organize my uploads into month- and year-based folders’ option and save your changes. WordPress will start storing your files directly in /wp-content/uploads/ folder.

Advanced WordPress users can use a custom upload directory instead of the default location. See our guide on how to change the default media upload location in WordPress.

Organizing Your Images in WordPress

WordPress does not allow you to use custom folders when uploading your images. This makes it difficult for users to organize their images in a folder based structure.

However, you can use image tagging to organize your WordPress media uploads. WordPress gallery plugins like Envira Gallery make image organization easier with albums and image tags.

We hope this article helped you learn where does WordPress store images on your site. You may also want to see our guide on how to find royalty free images for your WordPress blog.

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

370 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

  • 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

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

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

30 Comments

Leave a Reply
  1. guy says:
    Nov 30, 2020 at 1:51 pm

    hi
    i have about 100 images in my gallery.
    when i looked at the download images in the server, i sow almost 1000.
    same image 10 times.. with different resolution.
    why is that?
    how do wordpress store images?
    thanks

    Reply
    • WPBeginner Support says:
      Dec 1, 2020 at 9:18 am

      Those are generated image sizes, you would want to take a look at our guide below for preventing duplicates:

      https://www.wpbeginner.com/wp-tutorials/how-to-prevent-wordpress-from-generating-image-sizes/

      Reply
  2. Gabriel Bartholomeu says:
    Apr 30, 2019 at 11:23 am

    If I only move the files to wp-content folder, does it still creates a reference in database?

    Reply
    • WPBeginner Support says:
      May 1, 2019 at 11:00 am

      No, it would not.

      Reply
  3. Pratik Patel says:
    Apr 17, 2019 at 9:02 am

    Hello Admin,

    I have some issues in automated Generated URLs,

    I have some URLs that includes only individual images in body from the rest of the website URLs, and they are indexed in Google. I wanted to remove this type of URLs from the Google Index.

    Reply
    • WPBeginner Support says:
      Apr 17, 2019 at 11:36 am

      If you mean the image attachment page then you would want to set up your robots.txt: https://www.wpbeginner.com/wp-tutorials/how-to-optimize-your-wordpress-robots-txt-for-seo/

      If they are pages you created then you can use a plugin like Yoast SEO to noindex the page: https://www.wpbeginner.com/wp-tutorials/how-to-hide-a-wordpress-page-from-google/

      Reply
  4. Luis Garcia says:
    Nov 14, 2018 at 11:38 pm

    Hi,

    I have been working in a website. It is a redesign of an already existing page, so what I did was: I exported all posts and pages through WP Exporter, but the images were missing. So, now the posts that had galleries don’t have the galleries, they don’t show up. Later, and as I was really advanced, I realized I should’ve exported and imported the database as well. Long story short, now I am trying to recover those images and make them appear in my current site. Is there a way to blend the last database with the new one?
    Thanks a lot.

    Reply
  5. Lucy says:
    Sep 15, 2017 at 1:35 pm

    Hi,
    Thanks a lot for your help!!!

    Is there a plugin which can help to remove all the images not actualy used in any posts or pages?

    Thank you.

    Reply
    • John Cena says:
      Mar 19, 2018 at 6:16 am

      Is this possible in WooCommerce?

      Thanks in advance

      Reply
  6. Nitish says:
    Jul 8, 2017 at 6:50 am

    Hello
    how to upload user images from custom template to custom folders and also in database table.

    Pls help
    Thanku.

    Reply
  7. Adam says:
    Apr 21, 2017 at 6:43 pm

    Hello – Are there other places that WP can store images? I’ve taken over a legacy site (a pretty new site) and an image i need to replace is not located in the media library but does not appear to be hosted outside the site.

    Reply
    • John says:
      Dec 19, 2017 at 9:55 am

      Hi Adam, did you ever figure this out? I’m running into the same issue. I have a list of images that are too big in file size, so I am going through the site and reducing these to optimize our site upload time. I’m having no luck with finding ANY images that contain “/legacy” in the URL.

      Reply
  8. Mahmoud Momani says:
    Apr 16, 2017 at 11:21 am

    Hello,
    Thanks for the article.
    I have a question about converting an ASP.NET website to wordpress, if you can write an article describing the required tables and how to insert data in it.
    Thanks.

    Reply
  9. Holly says:
    Apr 11, 2017 at 1:46 pm

    If I delete and image from my media library after posting it to my site will it delete the image off of my site as well?

    Reply
    • WPBeginner Support says:
      Apr 12, 2017 at 1:01 am

      Hi Holly,

      Yes, it will delete the image from your site as well.

      Reply
  10. Ruth Billheimer says:
    Apr 11, 2017 at 7:58 am

    Am I right in thinking that having a lot of images in the media library doesn’t slow up the site? I’m trying to get my head round the way pages load, to try and get a better speed. So if you have a lot of images on a page, they will slow it up but it doesn’t matter how many images you have stored. Is that right?

    Reply
    • WPBeginner Support says:
      Apr 12, 2017 at 2:06 am

      Yes. You can store as many images on your site as you want. However, WordPress will only load the images displayed on the page. You need to make sure that your images are optimized for speed and performance.

      Reply
  11. nilesh nolkha says:
    Mar 28, 2017 at 1:51 am

    I had one question regarding SEO of images. When you upload pics in media library, you can suggest a title, caption and alt text. Similarly when you are actually adding that media to the post pr image widget on page builder, you again can enter title, caption, alt image etc. Does it matter if we do it once or we have do it again for the media while adding it to a post ? How it is different

    Reply
    • Ruth Billheimer says:
      Apr 12, 2017 at 1:13 am

      I think the caption can vary depending on where you’re using the image but the others stay the same. The alt text should be different from the title, or you can mark the image as decorative. If you have an accessibility plugin for people with a visual impairment, you also have to fill in the description.

      Reply
  12. Sandy Ellingson says:
    Feb 3, 2017 at 2:32 pm

    Is there a way to export a list of items in the media file with the associated links? I found this post while trying to answer this question. I have looked for the wp_post file via phpmyadmin and can’t find it. Perhaps this is an old post?

    Reply
  13. Marc Connor says:
    May 25, 2016 at 1:01 pm

    Do you guys recommend using your own image folder structure via FTP?

    I like to create a folder in the root called “images”, and store the images there. Well, as many as that particular WordPress t heme would let me.

    Is that better or worse than the default date-based structure?

    Sincerely,
    Marc

    Reply
  14. Bob says:
    May 21, 2016 at 1:03 am

    I built a website on my churches server. So now when I’m building my personal site which is a different server. I see all of the media of my churches site with my personal. Oh I built them on my laptop.

    Reply
  15. Ronnie says:
    Apr 7, 2016 at 11:09 pm

    Please make the website responsive on phone

    Reply
  16. jabbo126 says:
    Apr 5, 2016 at 5:55 am

    It’s shame, that WordPress still haven’t better media files upload solution with better folder organization.

    Reply
  17. Ikramullah says:
    Apr 5, 2016 at 3:16 am

    Hi,
    My attached one of images are not shown as image tag beside starting paragraph as a tag.
    How to enable this feature?

    I need this info.

    Thanks.

    Reply
  18. arya says:
    Apr 4, 2016 at 6:53 am

    good post

    Reply
  19. vijay jangra says:
    Mar 31, 2016 at 3:10 pm

    Hello editorial staff members, i have read and seen your many blog posts. I have a question in mind.
    How to build these beautiful images for your blog posts.

    Reply
  20. kif says:
    Mar 31, 2016 at 11:59 am

    hello, can you tell us why wp crop images? even when i upload i single one?

    thank you for your daily edition emails!

    Reply
    • Nawaze says:
      Apr 4, 2016 at 5:06 pm

      I do not know better, but I think after uploading you should change the size to full.

      Reply
    • Kevin says:
      Jan 18, 2017 at 12:47 pm

      WP automatically creates thumbnails, and versions for various sizes (small, medium, large, etc) for use with various devices on responsive website. So generally you’ll have the original size + the various auto-created sizes. You can then pick the appropriate size when adding an image to a page/post and WP will then serve the correct version for the device being used.

      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
OptinMonster
OptinMonster
Convert website visitors into email subscribers. 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 2020 (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 (2020)
    • 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 (2020)
    • SiteGround Reviews from 4196 Users & Our Experts (2020)
    • Bluehost Review from Real Users + Performance Stats (2020)
    • 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 2020 – Step by Step Guide
Deals & Coupons (view all)
SeedProd Logo
SeedProd Coupon
Get 50% OFF SeedProd Coming Soon Page plugin for WordPress.
Cozmoslabs
Cozmoslabs Coupon
Get 15% OFF on Cozmoslabs WordPress premium plugins.
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
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon

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

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