upload custom file types wordpress

How to Upload Custom File Types on WordPress

Translate:

 – 

English
 – 
en

French
 – 
fr

German
 – 
de

Hindi
 – 
hi

Indonesian
 – 
id

Japanese
 – 
ja

Malayalam
 – 
ml

Portuguese
 – 
pt

Spanish
 – 
es

Turkish
 – 
tr

Sometimes you may want to upload files other than images and videos to your WordPress site. By default, WordPress supports uploading only a limited number of file types for security reasons. If you try to upload some uncommon file extensions, you will run into the error: Sorry, this file type is not permitted for security reasons. In this article, I will guide you how you can upload any types of files to your WordPress site. Read on to learn more..

How to Upload Files on WordPress?

First of all, let us look into how to upload files to WordPress. There are two main ways to upload anything to WordPress:

1. Upload using File Block in the Editor
Files can be directly uploaded within the Editor screen when of Posts or Pages. Go to Pages or Posts > Add New and click on + icon to add the File Block.

WordPress File Block
WordPress File Block

Once you add the File Block, click on Upload button or on Media Library to select files that are already uploaded to the site.

2. Upload Through Media Library

Another way to upload files to your WordPress site is by clicking on Media on the left sidebar and then click on Add New.

WordPress Upload Media
WordPress Media Uploader

Supported Files on WordPress

The files that can be uploaded to your site can also depend on file types allowed by your web host. It is possible that your web host or server settings might prevent uploading of certain file extensions. Anyhow, by default WordPress supports uploading of following file extensions:

Images

  • .jpg
  • .jpeg
  • .png
  • .gif
  • .ico

Documents

  • .pdf (Portable Document Format; Adobe Acrobat)
  • .doc, .docx (Microsoft Word Document)
  • .ppt, .pptx, .pps, .ppsx (Microsoft PowerPoint Presentation)
  • .odt (OpenDocument Text Document)
  • .xls, .xlsx (Microsoft Excel Document)
  • .psd (Adobe Photoshop Document)

Audio

  • .mp3
  • .m4a
  • .ogg
  • .wav

Video

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

If you try to upload any other types of files or file extensions, you will encounter the following error:

WordPress File Upload Error
WordPress File Upload Error

To Upload Additional File Types on WordPress

The fix for the above error is pretty easy. If your web host or the server on which the site is hosted does not limits uploads, you can install the plugin WP Extra File Types.

WP Extra File Types Plugin
WP Extra File Types Plugin

This plugin can be downloaded for free from here: https://wordpress.org/plugins/wp-extra-file-types/

Once you install and activate this plugin, go to Settings > Extra File Types to access the settings of the plugin.

WordPress error You are not allowed to upload this file type
WP Extra File Types Plugin Settings

By default, the plugin comes with details of over a hundred file extensions. If the type of file that you are trying to upload is listed there, mark the checkbox corresponding to it and save the changes. Once the changes are done, go back to the Editor and try uploading the file again, it will work fine.

Don’t worry if the file extension that you are looking to upload is not listed there. The plugin also supports addition of custom file types.

Add Custom File Types on WP Extra File Types Plugins

Suppose you wish to upload a file with extension such as .afdesign. This file extension is not listed in WP Extra File Types plugin.

To add details of this file extension, scroll down to the bottom of the plugin settings and press on + icon.

WP Extra File Types Add
Adding Custom File Type in WP Extra File Type

You can give a Description related to the file type for future reference. .afdesign is a file extension related to the software Affinity Designer.

Then add the File Extension and Mime Type of this particular file type. To find out the Mime Type of the file, you can use the website: https://datatypes.net/

Wrap Up

I hope this article gave you an insight on how to add support for uploading of any file types or extensions to your WordPress site. If you have any questions, feel free to write to me in the comments.

Leave a Reply

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