Block mp4-files in Wordpress

Hi there!
How can i block mp4-video-files für the whole multisite?

  • Predrag Dubajic

    Hey Roger,

    Hope you're doing well :slight_smile:

    You can give it a try with something like this added to your child themes functions.php or added as mu-plugin:

    function remove_mime_types($mimes){
    	unset( $mimes['mp4'] );
    	return $mimes;

    If you're using WordPress Multisite installation then there's no need to add this code, you can go to Network admin, Settings > Network Settings panel and scroll down to "Upload file types" field where you can simply remove extensions you want to block.

    Hope this helps :slight_smile:

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.