CSS files often contain references to wp-content, wp-includes, and other WordPress paths that reveal your CMS identity even after WP Ghost changes them in the HTML. WP Ghost solves this by processing cached CSS and JS files and replacing the old paths with your custom ones. This works alongside your cache plugin and doesn’t affect page load speed because the path replacement happens once when the cache files are generated, not on every page load.
WP Ghost changes paths in the HTML output, but CSS files contain their own references to WordPress directories: background image URLs pointing to /wp-content/uploads/, font paths referencing /wp-content/themes/, or icon paths using /wp-includes/. Cache plugins combine and minify these CSS and JS files, which means the original paths get baked into static cache files. Without the “Change Paths in Cached Files” option, these cached files still expose the original WordPress directory structure even though the HTML uses your custom paths.
WP Ghost detects your cache plugin automatically and processes the cached CSS and JS files, replacing WordPress paths with your custom ones. The replacement happens once when the cache is generated, so page load speed is not affected on subsequent visits.
Compatible with major cache plugins. WP Ghost works with WP Rocket, LiteSpeed Cache, Autoptimize, Breeze, Cache Enabler, Hummingbird, W3 Total Cache, and others. See the full compatibility list.
Clear your cache after enabling. Existing cached files still contain old paths until the cache is regenerated. After enabling this option and saving in WP Ghost, go to your cache plugin and purge the entire cache. WP Ghost will process the new cache files as they’re created.
No. WP Ghost processes cached files once when they’re generated by your cache plugin. After that, visitors load the already-processed static files with no additional overhead. The speed impact is negligible and only occurs during cache generation, not on every page view.
If you don’t use a cache plugin, there are no cached CSS/JS files to process. WP Ghost’s HTML output replacement handles paths in dynamically loaded content. However, CSS files loaded directly from WordPress (not combined or minified) may still reference original paths. In this case, use the Text Mapping in CSS and JS files option at WP Ghost > Mapping > Text Mapping to handle dynamic path replacement in non-cached files.
Yes. WP Ghost processes the cache files before the CDN picks them up. The CDN serves the already-processed files with your custom paths. After enabling this option, purge your CDN cache alongside your WordPress cache plugin so the CDN fetches the updated files.
“Change Paths in Cached Files” processes static cached files generated by your cache plugin. “Text Mapping in CSS and JS files” dynamically replaces text in CSS and JS files at runtime. The cached files option is more performant because it processes files once. Text Mapping handles dynamic (non-cached) files and is also used for custom class name replacements like renaming wp-block classes.
No. WP Ghost processes copies of files in the cache directory, not the original WordPress files. Cache plugins generate static copies of CSS and JS, and WP Ghost modifies those copies. Original files remain untouched.
Cache compatibility and path security:
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.…