Skip to contentSkip to main navigation Skip to footer

Changing classes names and URLs in the site’s source code is not an easy task, especially when the classes are actively used by plugins you’ve installed on your site.

Although some plugins are easy to identify because they use their names in the CSS and JS file paths, you still need to be careful when using this group of features, which encompasses the following options:


To reach this group of features inside Hide My WP Ghost, navigate to Hide My WP > Mapping

Next up, we’ll talk about each one of the four options you’ll find in this section of Hide My WP Ghost – and what it helps you achieve.

URL Mapping

If the feature is not active, activate it from Hide My WP > Overview.

To reach the URL Mapping feature, navigate to Hide My WP > Mapping > URL Mapping

Hide My WP Ghost can’t automatically change all the URLs containing plugin names from your site’s source code without your input, but you can do this by using the URL Mapping feature.

Why it’s important to do this? URLs containing plugin names are a vulnerability that hacker bots exploit.

If you find an URL in your site’s source code that reveals the name of the plugin even after activating Safe Mode or Ghost Mode and all the WordPress common paths are changed, just add that URL in the URL Mapping feature and give it another path (new URL).

This doesn’t just work for URLs containing plugin names, though. You can change other URLs as well – as long as they are internal URLs – by clicking on the Add another URL button.

This will add it to the URL Mapping table where you can change it into a new one using the New URL text field.

You can add a list of URLs that you want to change into new ones. It’s important to only include internal URLs from your frontend source code after you activate the plugin in Safe Mode or Ghost Mode.

No External URLs

Hide My WP Ghost only works with internal URLs in the mapping table.

Example:

You can change this URL from: https://yourdomain.com /assets/f9f4ca341/main.css
to:  https://yourdomain.com/mystyle.css

! Notice how we kept the .css extension for the modified URL we gave as an example. As a best practice, you should keep the original file extension when creating the new URLs that will replace the current URLs.


Text Mapping

If the feature is not active, activate it from Hide My WP > Overview.

This option allows you to change any class name in your site’s source code that reveals the you are using WordPress as your Content Management System (class names that are used for default elements in WordPress such as: wp-custom or wp-image).

Doing this helps hide your WordPress footprint.

Using Hide My WP Ghost, all you have to do in order to change any class name in your site’s code is:

  • go to Hide My WP > Mapping > Text Mapping
  • add the class name you want to change in the dedicated Text Mapping table and give it a custom name. Don’t forget to hit the SAVE button to save your settings.

Doing this will replace the initial class name in your site’s code with the custom one.

To make this task even easier, you’ll find predefined WordPress classes in this section of Hide My WP Ghost that you can automatically add to text mapping. (shown in the screenshot below)

All you have to do to add a predefined WordPress class to text mapping is click on the class you want to add from the list.

Once you’ve added a predefined WordPress class from the list, it will be marked in the list (a selected class will have a slightly less saturated blue color than a predefined class that you haven’t yet added to text mapping). This way, you’ll know which predefined classes you’ve already added to text mapping.

As some themes may use different classes listed here, we recommend that you:

  • verify the frontend after adding the classes to ensure that the theme you are using is not affected;
  • check to make sure the class changes have been correctly implemented in your site’s source code.

To completely hide a class, you can use the pattern {blank} which will hide the class name but won’t change its name.

e.g. class_name => {blank}

To give a class a random name, you can use the pattern {rand}. This way, the new name will be different every time.

e.g. class_name => {rand}

Don’t hide used classes

Use this feature carefully, as some classes like WooCommerce are used by plugins and may break the website’s functionality.


Text Mapping only Classes, IDs, JS variables

By using the Text Mapping only Classes, IDs, JS variables, the plugin will only change the text in classes, styles, IDs, and scripts. It will prevent changing the text in URLs and other places where it can damage the functionality.

To activate this feature, switch on Hide My WP > Text Mapping > Text Mapping only Classes, IDs, JS variables


Works For Visitors

The frontend class changes only work for site visitors to prevent any style issue for logged users.


CDN URLs

If the feature is not active, activate it from Hide My WP > Overview.

To reach the CDN feature, navigate to Hide My WP > Mapping > CDN URLs.

This feature is extremely useful when you use a CDN plugin for your website and want to change the WordPress common paths for the CDN domain too.

Hide My WP Ghost integrates with the most popular CDN plugins. However, in case you’re using a CDN plugin we haven’t yet tested for example, and the paths are NOT automatically changed, you can add the custom CDN domain in the CDN URLs table shown below to change the paths for it too.


Experimental

To reach the Experimental feature, navigate to Hide My WP > Mapping > Experimental

Here you will see two experimental options that you can choose to activate:

  • Text Mapping in CSS and JS files including caches
  • Optimize CSS and JS files

Here’s more about each one of these options and what it does.


Text Mapping in CSS and JS files including caches

Starting with Hide My WP Ghost version 4.4, you have the option to change the text in CSS and JS files. You can even change the classes like WooCommerce and Elementor from your website. Works well with the Text Mapping only Classes, IDs, JS variables option ON.

Changing the Text in CSS and JS files may slow down the loading speed of your website because they load dynamically with WordPress redirect.

To activate this feature, switch on Hide My WP > Mapping > Experimental > Text Mapping in CSS and JS files including caches

! Note that this option is still in the experimental stage, and we’re still working to fine-tune all the details.

Clear Cache After Save!

It’s important to clear the cache from your cache plugins and CDN. Give it a minute for the cache to update after you save.


Optimize CSS and JS files

If this option is activated, Hide My WP Ghost will activate the caching process for the website’s static files like CSS, JS, and Images. (useful if you don’t have a cache plugin)

The optimization process will add in the config file optimizations such as:

Header append Vary: Accept-Encoding
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
ExpiresDefault "access plus 1 month"

+ and many more.

This will definitely help the website’s loading speed for all the static files like CSS, JS, and images.

Here are a few tools that you can use to test your website’s speed:

To activate this feature, switch on Hide My WP > Mapping > Experimental > Optimize CSS and JS files