Manage File Types in WordPress Media Library (2026 Helpful Guide)

Manage File types in WordPress Media Library

In this article, we’ll see about Manage File types in WordPress Media Library.

The WordPress Media Library serves as a central hub for all your website’s media files, offering convenience and efficiency in managing your content.

However, sometimes you may encounter limitations in terms of allowed filetypes. Fear not!

We will explore effective techniques to manage file types in WordPress Media Library, empowering you with the flexibility to handle a wide range of media formats effortlessly.

What Are File Types and MIME Types?

Before making changes, it’s important to understand MIME types (Multipurpose Internet Mail Extensions).

A MIME type defines the nature and format of a file. For example:

  • .jpg → image/jpeg
  • .pdf → application/pdf
  • .zip → application/zip

WordPress uses MIME types to validate uploads and prevent unsafe files from being added to your server.

Official reference:

Why Manage File Types in WordPress?

Managing file types allows you to:

  • Upload modern formats like SVG, WebP, JSON
  • Restrict risky formats for security
  • Improve workflow for developers and content creators
  • Support third-party integrations and APIs

Manage File types in WordPress Media Library

By default, WordPress restricts the types of files that can be uploaded to the Media Library. This is done for security reasons and to ensure optimal compatibility with various web browsers.

However, you may encounter scenarios where you need to include additional filetypes or exclude certain ones to accommodate your website’s unique requirements.

To Get allowed file types, add followings code in functions.php file:

function get_allowed_filetypes() {
$allowed_filetypes = apply_filters( 'upload_mimes', array() );

return $allowed_filetypes;
}

How to Add Allowed Filetypes to WordPress Media Library

By default, WordPress only allows you to upload certain file types.

Most common file types for images & Microsoft Office documents are allowed. But let’s take a look at how to add additional filetypes in the WordPress Media Library.

Adding a single filetype looks like this:

function my_mime_types($mime_types){
$mime_types['zip'] = 'application/zip'; return $mime_types; }
add_filter('upload_mimes', 'my_mime_types', 1, 1);

In this example, zip is the file extension and application/zip is the MIME type.

You can also add multiple filetypes:

function my_mime_types($mime_types){
$mime_types['zip'] = 'application/zip'; $mime_types['tiff'] = 'image/tiff'; $mime_types['bmp'] = 'image/bmp'; return $mime_types; } add_filter('upload_mimes', 'my_mime_types', 1, 1);

How to Remove Filetypes from the WordPress Media Library

To remove default filetypes allowed by WordPress, we use the unset function.

function my_mime_types($mime_types){
unset($mime_types['pdf']); // Removes the .pdf extension return $mime_types; }
add_filter('upload_mimes', 'my_mime_types', 1, 1);

You can add & remove filetypes all in the same code block. Just list each file type (addition or removal) on its own line.

List of WordPress Accepted Filetypes

Please note: Even though WordPress allows it, your web hosting company might not. If you cannot upload a file on this list, please contact your web host.

Images

.jpg, .jpeg
.png
.gif

Documents

.pdf (Adobe Acrobat Portable Document Format)
.doc, .docx (Microsoft Word Document)
.ppt, .pptx, .pps, .ppsx (Microsoft Powerpoint Presentation)
.xls, xlsx (Microsoft Excel Spreadsheet)
.odt (OpenDocument Text Document)

Audio

.mp3
.m4a
.ogg
.wav

Video

.mp4, .m4v (aka: MPEG-4)
.mov (QuickTime)
.wmv (Windows Media Video)
.avi
.mpg
.ogv (aka: Ogg)
.3gp (aka: 3GPP)
.3g2 (aka: 3GPP2)

With the ability to manage file types in WordPress Media Library, you gain control over the types of media content your website can handle.

Recommended Method in 2026: Use Plugins

While code works, using plugins is safer and easier—especially for non-developers.

Popular Plugins:

  • WP Add Mime Types
  • File Upload Types by WPForms
  • Safe SVG

Benefits of Plugins:

  • No coding required
  • Built-in security validation
  • Easy UI to manage file types
  • Regular updates and compatibility fixes

Common Issues & Fixes (2026)

1. File Type Still Not Uploading

  • Check hosting restrictions
  • Verify MIME type is correct
  • Disable conflicting plugins

2. “Sorry, this file type is not permitted”

  • Ensure filter is properly added
  • Clear cache (browser + CDN)
  • Check user role permissions

Best Practices for Managing File Types

Security First

  • Avoid enabling executable files (.exe, .php)
  • Use sanitization for SVG uploads
  • Limit upload permissions by user role

Performance Optimization

  • Use modern formats like WebP
  • Compress files before uploading
  • Avoid large unoptimized media

Testing

  • Always test uploads after changes
  • Try different browsers and devices

Hosting Restrictions (Important)

Even if WordPress allows a file type, your hosting provider might block it.

If uploads fail:

  • Contact your hosting support
  • Check server-level MIME restrictions
  • Review .htaccess or server config

SEO Benefits of Manage File Types in WordPress

Optimizing file types improves:

  • Page load speed (Core Web Vitals)
  • Image SEO (WebP support)
  • User experience
  • Accessibility

Using modern formats like WebP and optimized PDFs can significantly boost rankings.

References

Conclusion

Managing file types in the WordPress Media Library is a powerful way to enhance your website’s flexibility and performance. Whether you choose to modify MIME types using code or rely on plugins, understanding how WordPress handles uploads gives you full control over your media workflow.

By manage file types in WordPress Media Library, you can ensure compatibility, security, and optimal user experience.

Whether you opt for plugins or custom modifications, manage file types in WordPress Media Library has never been easier.

Embrace the flexibility and make your media management journey a seamless one. Happy uploading!

Once you have added or removed a filetype from the allowed filetypes, you will need to clear your browser’s cache before the changes will take effect.

Here are some additional tips for manage file types in WordPress media library:

  • When adding a filetype to the allowed filetypes, you need to specify the MIME type for the file. You can find a list of MIME types here: https://www.iana.org/assignments/media-types/media-types.xhtml
  • When removing a filetype from the allowed filetypes, you need to make sure that you are removing the correct MIME type. If you remove the wrong MIME type, you may prevent yourself from uploading certain files to your WordPress site.
  • It is a good idea to test your changes before you make them public. You can do this by uploading a file of the filetype that you have added or removed from the allowed filetypes. If the file uploads successfully, then your changes have worked.

Hope this article helps you to manage file types in WordPress media library!

Write a Reply or Comment

Your email address will not be published. Required fields are marked *