If your theme looks broken or your site loads noticeably slower after activating WP Ghost’s Safe Mode or Ghost Mode, the custom path rewrite rules are not being handled by your server’s config file. Instead, WordPress is processing them through PHP redirects, which uses more resources and causes slow page loads and broken CSS/JS loading. This guide covers how to fix this for each server type.

WP Ghost warns you when this happens. If you visit your site as a logged-out visitor and return to the WP Ghost settings, you’ll see a notification indicating that rewrites are handled by WordPress instead of the config file:

WP Ghost notification warning that rewrite rules are handled by WordPress instead of the server config file, causing slower loading
Apache and LiteSpeed servers

On Apache and LiteSpeed, WP Ghost writes rewrite rules to the .htaccess file. Open your .htaccess in the WordPress root directory and verify you see rules between # BEGIN HMWP_RULES and # END HMWP_RULES:

# BEGIN HMWP_RULES
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^([_0-9a-zA-Z-]+/)?ajax$ /wp-admin/admin-ajax.php [QSA,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?custom-admin/(.*) /wp-admin/$2 [QSA,L]
...
</IfModule>
# END HMWP_RULES

If these rules are missing or incomplete:

Nginx servers

On Nginx, WP Ghost generates a hidemywp.conf file that must be included in your Nginx server block. The Nginx service must be restarted after any path change. Verify that your Nginx config contains include path_to_file/hidemywp.conf; and restart with sudo systemctl restart nginx. See Setup WP Ghost on Nginx Server or Nginx with Virtual Private Server for detailed instructions.

Windows IIS servers

On IIS, WP Ghost writes rules to the web.config file. Ensure the URL Rewrite 2 module is installed, the rules are present in web.config, and IIS is restarted after path changes.

Managed and cloud hosting

Each managed host has specific configuration requirements. Follow the setup guide for your hosting provider:

Text Mapping in CSS and JS causing slow loading

If your site loads slowly even with correct server configuration, check whether Text Mapping in CSS and JS files is enabled at WP Ghost > Mapping > Text Mapping. This option loads CSS and JS files dynamically to apply text replacements, which adds processing time on the first visit before cache is built. To resolve this, use a cache plugin (Autoptimize, LiteSpeed Cache, WP Rocket) to combine and cache CSS/JS files, and set the cache to regenerate weekly or monthly. If you don’t need class name or ID replacements in CSS/JS files, switch this option off for better performance.

If you’ve lost access to the admin dashboard, see the emergency disable guide.