What is URL Mapping in WP Ghost?

URL Mapping is a security feature that allows you to change internal URLs in your WordPress website’s source code.
It is designed to hide identifiable paths, such as plugin names or file structures, to prevent theme detectors and hackers from identifying that your site runs on WordPress.
How Does URL Mapping Work?
URL Mapping works by letting you replace internal URLs with custom paths while keeping the same file extensions. For example, you can change: https://domain.com/assets/plugin-name/style.css
to: https://domain.com/assets/custom-path/style.css
.
This ensures the website’s functionality remains intact while hiding sensitive information about the site’s structure.
Why is it Essential to Use URL Mapping?
- Protection Against Theme Detectors: Makes it more complicated for scanners to detect WordPress CMS usage.
- Customizable Paths: Allows flexibility to change any internal URL while preserving its functionality.
- Improves SEO: Cleaner URLs may improve user experience and load times.
- Enhanced Security: Protects against hackers and bots that target WordPress vulnerabilities.
- Improved Privacy: Hides plugin and theme names that could reveal the CMS or tools used on the site.
- Custom Branding: Allows the use of branded URLs that look cleaner and more professional.
How to Use URL Mapping in WP Ghost
Activate Safe Mode or Ghost Mode
Begin by activating Safe Mode or Ghost Mode to open the path customization process.
- Access your WordPress dashboard after installing and activating the WP Ghost plugin.
- Select Safe Mode or Ghost Mode. Safe Mode provides basic protection, while Ghost Mode offers more advanced security features.

Activate URL Mapping
After enabling Safe Mode or Ghost Mode in WP Ghost and customizing the paths, if you still notice plugin names or identifiable paths in your source code, even after customization, activate URL Mapping to replace URLs that might expose your site’s structure to bots or scanners.
- Go to WP Ghost > Overview > Features section.
- Switch on the URL Mapping feature.
- Click on Start Features Setup link to access the feature setting.

Add New URL Mapping
To change a URL using URL Mapping, follow these steps:
- Go to WP Ghost > Mapping > URL Mapping feature.
- Identify URL in the source code that need to be replaced.
- Add the relative URL you want to change into the left field.
- Add the custom relative URL into the right field.

Note! It’s important to include only internal URLs from your frontend source code.
Examples of URL Mapping
From URL | To URL |
---|---|
/core/module/ff55dedaeb/woocommerce.css | /core/module/ff55dedaeb/shop.css |
/core/cache/litespeed/ | /core/mycache/ |
/core/module/f9f4ca341/main.css | /mystyle.css |
/core/module/f9f4ca341/ | /custom_assets/ |
Note! If you have an Nginx server, remember to reload the service after saving the settings.
If you’re mapping a static URL with a CSS or JS extension, we recommend keeping the same extension to load the file as static for performance. Try to keep the original file extension when creating new URLs that will replace current ones.
Use a Cache Plugin to Hide Files
If you already have a cache plugin installed, check if the cache plugin has the option to minify/combine the CSS and JS files that can be detected. Use these features to combine and hide filenames for even better security.

If the plugin name is present in a CSS or JS file, another solution to hide the CSS and JS filenames is to use the option to minify/combine the CSS and JS files using a cache plugin like LiteSpeed, WP Rocket or Autoptimize. This way, you combine all files into one undiscoverable file for theme detectors.
We recommend using cache plugins for our compatibility list that are periodically tested with WP Ghost.