How to change allowed attachment files extensions

I think this may be what your looking for. Below are a few examples of altering the default file types allowed by WordPress. Keep in mind that some hosting companies will disallow some file types.

Allow All File Types

Add the following to wp-config.php to allow for any file type.

define( 'ALLOW_UNFILTERED_UPLOADS', true );

Allow or Disable Specific Types

Add the following code into your theme’s functions.php

function my_custom_mime_types( $mimes ) {

    // New allowed mime types.
    $mimes['svg'] = 'image/svg+xml';
    $mimes['svgz'] = 'image/svg+xml';
    $mimes['doc'] = 'application/msword'; 

    // Optional. Remove a mime type.
    unset( $mimes['exe'] );

    return $mimes;
}

add_filter( 'upload_mimes', 'my_custom_mime_types' );

Resources

Allowed mime Types

List of mime Types


Plugins

WP Add Mime Types

Disable Mime Check

error code: 523