How to Add Additional File Types to be Uploaded in WordPress

For higher safety, WordPress permits you to handiest add probably the most recurrently used record sorts. You can add recurrently used symbol codecs, audio/video, and paperwork the use of the default media uploader. But when you sought after to add a record sort that isn’t allowed? In this text, we can display you ways to upload further record sorts to be uploaded in WordPress.

Video Tutorial

If you don’t just like the video or want extra directions, then proceed studying.

File Types Allowed for Upload in WordPress

WordPress permits you to add maximum not unusual symbol recordsdata, audio/ video, PDF, Microsoft workplace and OpenOffice paperwork. WordPress codex has a complete record of allowed record sorts and extensions.

Adding Exceptions for Additional File Types

Security is the principle explanation why at the back of the limitation on record sorts that customers can add. However, this doesn’t imply that customers can’t trade this. Using a tiny little bit of code, you’ll be able to upload a brand new record sort and extension to the WordPress.

For instance, upload this code in your theme’s purposes.php record or a site-specific plugin to permit SVG record sort to be uploaded:

serve as my_myme_types($mime_types){
    $mime_types['svg'] = 'symbol/svg+xml'; //Adding svg extension
    go back $mime_types;
add_filter('upload_mimes', 'my_myme_types', 1, 1);

Notice that the record extension is going as the important thing in $mime_types related array and the mime sort is going as its worth.

In this case, svg record extension represents recordsdata with the mime sort symbol/svg+xml. You can in finding out mime varieties of a number of not unusual record extensions in this web page.

You too can upload more than one record sorts in one code snippet, like this:

serve as my_myme_types($mime_types){
    $mime_types['svg'] = 'symbol/svg+xml'; //Adding svg extension
    $mime_types['psd'] = 'symbol/vnd.adobe.photoshop'; //Adding photoshop recordsdata
    go back $mime_types;
add_filter('upload_mimes', 'my_myme_types', 1, 1);

Adobe photoshop filetype uploaded

We hope this text helped you find out how to permit further record sorts to be uploaded in WordPress. You may additionally need to check out how to building up most record add dimension in WordPress.

If you loved this text, then please subscribe to our YouTube Channel for WordPress video tutorials. You too can in finding us on Twitter and Google+.

Recent Articles

The Best Pinterest Alternatives to Use if You are Bored of Pinterest

Pinterest is a loved social media network among the lover of aesthetics, mostly females tbh. Now, however more and more people are...

Ways you can add links to your Instagram post in 2021

Instagram has many cool features which need no introduction. However, there are a number of features that...

Finance App You should Have on Your iPhone and Android

We live in the age of digitization. When everything is digital, it is no surprise that money has joined the club too....

5 Video Editing Softwares to Try Your Hand at in 2021

Video is the king when it comes to social media. With reels dominating Instagram and Facebook and...

Charge Your Laptop Without a Charger in 5 Ways

Forgetting your laptop charger is a pretty common thing. We all have been there and all of...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here