How to upload blocked file types in WordPress – Learn WordPress from a to z

Tutorials 0 lượt xem
How to upload blocked file types in WordPress - Learn Wordpress from a to z thumbnail

Want to upload files that are not supported by WordPress?

You can upload many types of files in WordPress, including images, videos, audio, and document files. However, there are still file types that are not supported by WordPress to upload.

In this article, I will show you how you can upload blocked file types in WordPress.

What file types are allowed to be uploaded in WordPress?

To keep your site secure, you can upload only the most commonly used file types to your WordPress site. WordPress also has a maximum size limit for files that can be uploaded.

By default, the file types allowed to upload are:

  • Images: .jpg, .jpeg, .png, .gif, .ico
  • Documents: .pdf, .doc, .docx, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .psd
  • Audio: .mp3, .m4a, .ogg, .wav
  • Videos: .mp4, .m4v, .mov, .wmv, .avi, .mpg, .ogv, .3gp, .3g2 (Although you can upload videos to WordPress, I recommend using a web hosting video instead. This helps protect your site’s speed and performance.)

However, some file types can be a security risk, so WordPress does not enable them by default. If you try to upload unsupported file types to your WordPress site, you will see an error message: “Sorry, you are not allowed to upload this file type”.

File download error message

But what if you need to upload an unsupported file type? You can upload files through FTP or your WordPress host’s file manager. But that’s not as convenient as using the default WordPress library. Soon I will show you how to download files that are not allowed through the default WordPress library.

How to add additional file types to be uploaded in WordPress

First, you need to install and activate the File Upload Types by WPForms plugin .

Use preset files

Upon activation, visit Settings » File Upload Types page in your WordPress admin area. Then just search for the files you want to upload in the search box.

Search for uploaded files

Next, select the type of file you want to upload in the checkbox.

Once done, you need to click the “Save Settings” button at the bottom of the screen to store your changes.

Save upload file type

You should now be able to upload those types of files using the WordPress media library.

Add custom files

If the file type you want to add is not in the list of presets, you can add it as a custom file.

When you scroll to the bottom of the screen, you will come to a section titled “Add Custom File Types”. Here, you can add a new file type.

Add new file type

For example, if you wanted to add a YAML file type, you would enter “YAML file” in the description, “text/yaml” in the MINE Type, and “.yaml” as the file extension.

Epilogue

I hope this article is useful and you can apply it to upload the necessary file types according to your needs.

If you found this article useful, please comment and share this article. In addition, you can follow the WordPress Tips section and follow Facebook for more new knowledge.

Bài viết liên quan