How to Completely Disable WP Customizer
In this article, we will discuss how to completely disable the WordPress Customizer. This can be useful if you want to get rid of unnecessary interface elements or improve the performance of your site.

Complete disabling of the WordPress Customizer may be necessary for the following reasons:
-
Performance: Disabling the Customizer can speed up the loading of the site, especially if the Customizer loads many resources or makes additional requests to the server.
-
Security: In some cases, especially if the site operates under heightened security conditions, administrators may disable the Customizer to prevent potential vulnerabilities or limit access to theme settings.
-
Stability: If the Customizer causes conflicts with other plugins or themes, disabling it can help avoid errors and compatibility issues.
-
Simplifying the Interface: In some cases, administrators want to simplify the management interface for users so that they cannot accidentally change important site settings.
- Special Project Requirements: Some projects may require complete control over settings through code, without using the Customizer. This can be important for developers creating custom solutions for clients.
Complete Disabling of the Customizer in WordPress - Removing the Customizer
To remove the WordPress Customizer, you can use a small plugin Disable Customizer.
Below is the adapted code of this plugin, so you do not have to install the plugin, but can embed it into the project using Must-Use Plugins.
Create the file /wp-contents/mu-plugins/disable-wp-customizer.php
. And add the following code to it:
<?php /* * Plugin name: Disable Customizer * Description: Completely turn off customizer on your site. * * Plugin URI: https://gist.github.com/doiftrue/6d8f975ed8af5ac325b6d9a1c52abf1c * Author URI: https://wp-kama.com * Author: Timur Kamaev * Note: This is a fork of https://wordpress.org/plugins/customizer-disabler/ (v2.2.7) * Source Author: Johannes Siipola * Source Author URI: https://siipo.la * * Version: 2.3.0 */ defined( 'ABSPATH' ) || exit; Disable_WP_Customizer::init(); class Disable_WP_Customizer { public static function init(): void { add_filter( 'map_meta_cap', [ __CLASS__, 'map_meta_cap__remove_customize_capability' ], 10, 2 ); add_action( 'admin_init', [ __CLASS__, 'on_admin_init' ], 10 ); } public static function on_admin_init(): void { remove_action( 'plugins_loaded', '_wp_customize_include', 10 ); remove_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings', 11 ); add_action( 'load-customize.php', [ __CLASS__, 'on_load_customizer', ] ); } public static function map_meta_cap__remove_customize_capability( $caps, $cap ) { return ( $cap === 'customize' ) ? [ 'do_not_allow' ] : $caps; } public static function on_load_customizer(): void { /** @noinspection ForgottenDebugOutputInspection */ wp_die( 'The Customizer is currently disabled.' ); } }
This code:
- Removes the initialization of the Customizer code.
- Resets the user's capability (customize) to use the customizer.
- Removes links to the Customizer from the admin menu and toolbar.
- Removes custom CSS added via the Customizer.