Do you want to allow additional file types to be uploaded to your forms? Allowing more file formats to be uploaded to your site can provide more convenience for yous and your users.

In this tutorial, we'll prove you how to add different file extensions, without compromising the security of your site.

  • File Types Allowed By Default
  • Adding Boosted File Upload Types
    • Using Preset File Types
    • Adding Custom File Types
    • Assuasive Multiple MIME Types
  • Tips for Securing WordPress File Uploads
  • Frequently Asked Questions

Note: Are y'all looking for instructions on creating a file upload form? Then be sure to check out our guide to the File Upload field for all the details.


File Types Allowed By Default

For security reasons, WordPress only allows sure types of files. The default file formats include:

  • Images like .png, .gif, .jpg
  • Documents such as .dr., .xls, .ppt, .pdf
  • Audio similar .wav, .mp3, .mp4
  • Video like .mpg, .mov, .wmv

Please notation that some of the file types below do take the potential to be misused. That'south why WordPress doesn't enable them by default.

  • Images such every bit .svg, .bmp
  • Documentslike .psd, .ai, .pages
  • Lawmaking files such as .css, .js, .json
  • Video like .flv, .f4l, .qt

Adding Boosted File Upload Types

To configure your site to accept additional file formats, you lot'll need to install File Upload Types, a free WordPress plugin by WPForms.

Notation: For details on how to add a plugin to your site, exist sure to cheque out WPBeginner's guide on installing plugins.

Using Preset File Types

Once you've installed the File Upload Types plugin, in your WordPress admin expanse go to Settings » File Upload Types.

File upload types page

On this page, you can add preset file types by checking the box next to the file type.

Enable extension checkbox

Once you've selected the file types you'd like to add, click the Save Settings push to save your changes.

Click save settings button preset file

Adding Custom File Types

If you lot'd similar to include a file format that is not establish in the preset list, you can add your ain.

To do this, scroll downward to the ADD CUSTOM FILE TYPES department. Then, you lot'll need to specify a file format. This is done through three fields:

  • File Description: The name of the file blazon. This will only exist visible in your File Upload Types settings, and then you tin add together any details that brand sense to you.
  • MIME Blazon: The category and data type represented by the new file blazon.
  • Extension: The extension type that will be associated with this file (due east.thou., .jpg, .docx, etc.).

Note: MIME is a form of file identification on the web. For more details on MIME, you can check out Mozilla's documentation for a consummate listing of common MIME types. To determine what MIME type a file is, you can utilise an online file checker.

Add custom file types section

Equally an case, hither are the fields with the data for a YAML file type:

YAML file extension

You can also add multiple custom file types by clicking on the plus (+) icon. If you'd like to remove a file type, click the trash tin can icon.

Plus and trash icons

Once you've filled in all these details, click on the Save Settings push button to apply the settings to your site.

Click save settings button

Allowing Multiple MIME Types

If you lot're adding a file type that has several aliases or possible MIME types, you can as well add these into the MIME Types field. This is especially helpful to ensure the proper uploading of files that may have the same extension, but different MIME types.

Note: If yous're not sure if your file blazon has aliases, you can check out this reference guide for a fractional list.

In order to use this feature, you lot'll need to click the Enable multiple MIME type support option within the plugin.

Enable multiple MIME type support

Note: If you don't see this banner in your plugin, this means this choice is already enabled on your site.

Once you've enabled this feature, you tin can then add aliases to the MIME Type field, separating each blazon by a comma.

For example, we'll add the application/photoshop, application/psd, and epitome/photoshop aliases for a Photoshop file:

Photoshop file example

Once those settings are added, make sure to click the Salvage Settings push button to apply the settings to your site.

Click save settings photoshop file example

Tips for Securing WordPress File Uploads

Information technology may exist convenient to permit users to upload all sorts of file formats, however, this tin lead to security issues. You tin proceed your site more secure while allowing for specific upload types by following these tips:

  • Requiring users to be registered and logged in to submit your form.
  • Limiting file upload types to only those that you really need.
  • Limiting the file upload size.

Frequently Asked Questions

I added my boosted file blazon, but I'm still seeing the post-obit error:

File type not allowed

In this case, y'all'll want to be sure that the file you're trying to upload has a MIME type that matches the one you've added to your site. You can apace and easily cheque your file'southward MIME type to exist sure its blazon matches.

If your MIME type matches and still won't upload, it'due south important to know that WPForms does blacklist sure file types. Some file types will be blocked from being uploaded, even if they've been added using the File Upload Types plugin. The complete list of file types are:

ade adp app asp
bas bat cer cgi
chm com cpl crt
csh csr dll drv
exe fxp flv hlp
hta htaccess htm html
htpasswd inf ins isp
jar js jse jsp
ksh lnk mdb mde
mdt mdw msc msi
msp mst ops pcd
php pif pl prg
ps1 ps2 py rb
scr sct sh shb
shs swf tmp torrent
url vb vbe vbs
vbscript wsc wsf wsh
dfxp onetmp

That'southward it! You tin now allow users to upload additional file types using your file upload grade.

Do you want more than tips for securing your site? Then be sure to check out our complete guide to WPForms security for all the details.