WordPress Gutenberg adds wp-block- class names throughout your site’s HTML source that identify it as a WordPress site. WP Ghost’s Text Mapping feature can rename these classes to remove the wp- prefix. If your theme doesn’t use Gutenberg blocks at all, you can also remove the Gutenberg block library entirely from the frontend for both better security and faster loading.
CMS detection tools scan HTML source code for WordPress-specific patterns. Gutenberg’s wp-block-paragraph, wp-block-image, wp-block-heading, and dozens of similar class names are strong WordPress signals. Even if you’ve changed all paths with WP Ghost and removed the generator tag, these class names can still reveal that your site runs WordPress. Renaming them removes this fingerprint. If your theme uses a classic editor or a page builder instead of Gutenberg, removing the block library also eliminates unused CSS files for faster page loads.
wp-block. In the Text To field, enter your replacement (for example, block or cb).All instances of wp-block in the HTML, CSS, and JS output are now replaced with your custom name. CMS detection tools can no longer identify Gutenberg classes in the page source.
Use a cache plugin for best performance. When “Text Mapping in CSS and JS files” is enabled, WP Ghost loads CSS and JS files dynamically to apply the replacements. A cache plugin stores the processed files so this only happens once, not on every page load.
If your theme doesn’t use Gutenberg blocks (for example, you use Elementor, Divi, or a classic editor theme), you can remove the Gutenberg block library entirely from the frontend. This removes the wp-block CSS files and global styles, improving both security and page load speed.
Add the following code to your child theme’s functions.php file or a code snippets plugin:
add_filter('should_load_separate_core_block_assets', '__return_true');
add_action('wp_enqueue_scripts', function() {
wp_dequeue_style('wp-block-library');
wp_dequeue_style('wp-block-library-theme');
wp_dequeue_style('wc-block-style');
wp_dequeue_style('storefront-gutenberg-blocks');
wp_dequeue_style('classic-theme-styles');
}, 100);
remove_action('wp_enqueue_scripts', 'wp_enqueue_global_styles');
remove_action('wp_footer', 'wp_enqueue_global_styles', 1);
remove_action('wp_body_open', 'wp_global_styles_render_svg_filters'); Only use this if your theme doesn’t rely on Gutenberg blocks. This code removes the block CSS library from the frontend. If your theme uses Gutenberg blocks for layout, columns, buttons, or other elements, removing the library will break their styling. Test thoroughly after adding this code. Use a child theme or code snippets plugin so changes persist across theme updates.
If your theme doesn’t use Gutenberg, removing the block library (Method 2) is enough since there won’t be any wp-block classes to rename. If your theme does use Gutenberg blocks, use Text Mapping (Method 1) to rename the classes while keeping the block library functional. Using both together works on sites that partially use Gutenberg: the library removal handles unused global styles, and Text Mapping catches any remaining block classes in your content.
Not if you enable “Text Mapping in CSS and JS files.” WP Ghost replaces wp-block in both the HTML class attributes and the CSS selectors, so the styles continue to match. Without CSS/JS mapping enabled, the class names in HTML would change but the CSS selectors wouldn’t, breaking the styling.
If you exclusively use Elementor, Divi, or another page builder for all your content, removing the block library (Method 2) is the better approach. It eliminates the unused CSS entirely rather than just renaming classes that serve no purpose. However, if any of your pages use the default WordPress editor alongside the page builder, use Text Mapping to cover those pages.
WooCommerce uses Gutenberg blocks for some features (product grids, cart, checkout in newer versions). If you use the block library removal code, test your WooCommerce pages carefully. The code includes wc-block-style dequeue which removes WooCommerce block styles. If WooCommerce pages look broken, remove the wc-block-style line from the code.
No. Text Mapping replaces text in the HTML output buffer at render time. The Gutenberg library removal code uses standard WordPress dequeue hooks. No core files are modified.
WordPress identity removal and text mapping:
Replace the default wp_ database prefix with a random one to protect against SQL injection…
Change the WordPress uploads directory path with WP Ghost (rewrite rules, no files moved) or…
Configure WP Ghost with WP Rocket cache. Enable file optimization, Change Paths in Cache Files.…
https://youtu.be/6ylhojSi-_E In this video, we’ll explore why website security matters and what can happen if…
The security of your WordPress site depends on multiple factors, such as the strength of…
Step-by-step guides to connect WP Ghost 2FA with Google Authenticator, Authy, Microsoft Authenticator, or LastPass.…