skip to Main Content

How to Disable the WP Audio & Video Media Players

By default WordPress loads custom scripts that modify HTML5 (self-hosted) video and audio elements inserted into your posts with a custom design. This is really just added bloat and was originally added to provide support for these players across all browsers, but it's no longer needed. It is recommended to disable these custom scripts and render your video and audio elements using native browser players.

 * Disable the WP Audio & Video Media Players.
 * @link
add_action('wp_enqueue_scripts', function(){
	wp_deregister_script( 'wp-mediaelement' );
	wp_deregister_style( 'wp-mediaelement' );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top