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.
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.
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:
You can view these folders by connecting to your WordPress site using an FTP client.
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.
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.
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.
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.