We do not recommend using WP Ghost to hide classes such as “woocommerce“ and “elementor” (scroll down to the end of this article to see why).
However, since many people requested this feature, we’ve made it available as part of our ongoing commitment to delivering solutions that best meet our customers’ needs.
Some plugins like WooCommerce and Elementor are exclusively built for WordPress.
When their class names are detected in the site’s source code by theme detectors, you will receive the information that your website is using WordPress – even if all the WordPress-specific common paths are changed and hidden.
These plugins add their names to the source code and scripts in JS and CSS files based on those class names.
To hide class names from theme detectors, follow the steps below:
Now that you have changed the classes in the source code, you need to synchronize the new class names into the CSS and JS files.
Note! Enabling this option will create dynamic CSS and JS files, which may slow down the site’s loading time. This is why we recommend you use a cache plugin to optimize your website’s loading speed and cache the CSS and JS files.
Cache Plugin Note! If you are using a cache plugin, avoid inline defer JS and use delayed JS instead. Inline defer JS will load the javascript content in a Base64 URL and WP Ghost will not be able to load the JS file dynamically and change the class name and paths within.
Even if you change the class names and load the CSS and JS dynamically, browser caches, server caches, and probably CDNs can also cache the files.
If your theme appears broken or the layout doesn’t load correctly after modifying the WordPress core paths using WP Ghost, it could be due to incorrect server configurations.
When the new paths for CSS and JS files fail to load correctly, it typically indicates that they have not been appropriately configured. Let’s explore a couple of common scenarios and their corresponding solutions.
Here’s how to troubleshoot and resolve this issue:
The issue typically arises because the updated paths for CSS and JS files cannot be found or the class names were changed in the source code using WP Ghost > Mapping > Text Mapping and are not found in CSS files. This can disrupt your theme’s functionality and layout.
If you have a cache plugin or use server caching, clear all the cache, as the change of paths has significantly changed the website’s structure.
Go to WP Ghost > Change Paths, click the Frontend Test button, and follow the server configuration instructions, if any.
For Nginx Servers:
For Apache Servers:
AllowOverride is set to All in your server configuration..htaccess file to load the new paths correctly.Additional Resources
For a comprehensive guide on configuring your server to ensure themes and layouts load correctly, refer to this tutorial:
Theme Not Loading Correctly? Website Loads Slower?
By addressing these configuration issues, your theme and layout should display correctly after path changes.
Because hackers often use bots to search for security flaws in your website, it is…
The easiest way to change the default media uploads path is to use the WP…
To hide all CSS and JS you need to follow the steps to Combine the…
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…
When you enable two-factor authentication (2FA) for your WordPress website, it adds an extra layer…