How to Add Unsupported File Types in WordPress

Uploading files is an essential part of many WordPress websites. By default, WordPress allows you to upload common image, video, document, and audio file formats like JPG, PNG, MP4, PDF, and MP3.

However, sometimes you may need to upload file types that are not supported out of the box in WordPress. Adding the ability to upload additional file formats can be done easily with a plugin.

In this comprehensive guide, we‘ll show you how to upload unsupported file extensions using the File Upload Types plugin.

Why Upload Unsupported File Types?

Here are some common reasons you may want to upload file formats not allowed by default in WordPress:

  • Website owners may need to provide files like CAD drawings, PSD mockups, or other proprietary formats to clients and users.

  • Developers may need to upload CSS, JavaScript, JSON, or other code files to the server.

  • Designers may need to upload AI, SVG, INDD, and other files to the site.

  • Photographers may want to allow uploading RAW photo files like CR2 or NEF.

  • Video creators may need to upload and share video in formats like FLV, MKV, and other high quality codecs.

According to a 2021 survey by WP Engine, over 58% of WordPress users wanted the ability to upload more file types beyond the defaults.

Chart showing 58% of users want more file type support

Without the ability to upload these extra file types, you‘d need to use FTP or another method which is less convenient than the WordPress media library.

Enable File Types with a Plugin

The easiest way to add support for additional file formats in WordPress is by using the free File Upload Types plugin.

Once installed and activated, the plugin adds a File Upload Types settings page to your admin dashboard.

File Upload Types settings page

The interface allows you to enable or disable file types with just a click. There are over 100 presets for common unsupported formats:

  • Documents: PSD, INDD,Pages
  • Images: SVG, BMP, TIFF
  • Video: MKV, FLV, F4V
  • Code: CSS, JS, JSON
  • Archives: ZIP, RAR, 7Z

You can also add completely custom file types by entering a description, MIME type, and file extension.

Step-by-Step Guide: Adding a File Format

Follow these steps to add a new file format to WordPress:

  1. Install and activate the File Upload Types plugin.
  2. Go to Settings > File Upload Types in your WordPress dashboard.
  3. Scroll and find the file type you want or search for it.
  4. Check the box to enable that file format.
  5. Click Save Settings at the bottom.

Now you‘ll be able to upload files using that extension from within WordPress. It‘s as simple as that!

Adding Custom File Types

To add a custom file format not included in the plugin‘s list:

  1. Scroll down to the Add Custom File Types section.
  2. Enter a Description, MIME Type, and File Extension.
  3. Click the + icon to add another row for more custom types.
  4. Click Save Settings.

And you‘re done! The custom file types will now be supported.

Here‘s an example adding the YAML file format:

Adding custom YAML file type

Now you can upload .yaml files within WordPress.

Why MIME Types Matter

When adding custom file types, you need to specify the correct MIME type along with the file extension.

MIME (Multipurpose Internet Mail Extensions) is a standard for identifying file types online.

For example, a .jpg image file would have a MIME type of image/jpeg.

Specifying the proper MIME type ensures that:

  • Files are processed properly by the server
  • Downloads show the right file type icon
  • Files open correctly in web browsers

You can lookup unknown MIME types using a tool like MimeTypeMap.

File Management Tips and Best Practices

Allowing extra file formats is great, but you also need to consider file organization and optimization. Here are some tips:

  • Use folders to organize uploads instead of dumping everything at the root.
  • Add metadata like captions and descriptions to files.
  • Compress images to improve page load times.
  • Set upload limits to prevent huge files from crashing your site.
  • Delete unused files to save server space using a plugin like WP Sweep.
  • Optimize databases to maintain performance with an object cache like WP Rocket.

With the proper organization and limits, supporting additional file types won‘t slow down your site.

Other Helpful File Management Plugins

In addition to File Upload Types, some other helpful plugins for managing file uploads in WordPress include:

These plugins provide extra tools for managing the files you upload.

Get Complete Flexibility and Control

Allowing extra file formats to be uploaded in WordPress gives you much more flexibility. Just installing and configuring the File Upload Types plugin takes care of it.

Now you don‘t have to worry about getting an error when trying to upload an unsupported file type to WordPress.

Being able to upload any file format directly through WordPress can save you time and headaches. No more dealing with FTP uploads or web hosts‘ file managers!

We hope this comprehensive guide helped you add the file types you need in WordPress. Let me know if you have any other questions!

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.