WP Ghost works on aaPanel Multi-WebServer hosting (Nginx + OpenLiteSpeed) with a one-time script fix. In aaPanel’s Multi-WebServer setup, Nginx sits in front as a reverse proxy and OpenLiteSpeed (OLS) handles PHP. The problem: Nginx intercepts static file requests (CSS, JS, images, fonts) and tries to serve them directly from disk. When WP Ghost changes these paths, the files don’t exist at the new locations on disk, so Nginx returns 404 instead of passing the request to OLS where the rewrite rules apply. A provided script fixes this by telling Nginx to forward non-existent static file requests to OLS.
In a Multi-WebServer setup, Nginx handles static files directly for performance while OpenLiteSpeed handles PHP and rewrite rules via .htaccess. When WP Ghost changes WordPress paths, the rewritten URLs for static files (like /core/style.css instead of /wp-content/style.css) don’t match real files on disk. Nginx sees these as missing files and returns 404, never reaching OLS where the rewrite rules would map them correctly. The fix script adds a “try file, then forward” rule: if the file exists on disk, Nginx serves it directly (fast); if not, Nginx forwards to OLS (where WP Ghost rewrites apply).
/www/wwwroot/yourdomain.com/).openlitespeed.sh script file to the root folder.cd /www/wwwroot/yourdomain.com
chmod +x openlitespeed.sh ./openlitespeed.sh To run it for a specific domain only (useful if you host multiple sites):
./openlitespeed.sh yourdomain.com Testing nginx config...
Reloading nginx...
Done. Clear cache after running the script. If you use LiteSpeed Cache, Cloudflare, or any other CDN or caching plugin, clear the cache once to avoid old asset paths being served from cache.
The script acts as a traffic director between Nginx and OpenLiteSpeed. Here is what it does:
/www/server/panel/vhost/nginx/*.conf to find all domains./www/server/panel/vhost/nginx/extension/<domain>/static-fallback.conf.nginx -t and reloads Nginx so changes apply immediately..bak.<timestamp> copy).The script does not replace OpenLiteSpeed or modify WordPress. It only changes how Nginx handles static file requests for domains where rewritten URLs don’t match real files on disk. All other functionality remains unchanged.
You’re not in the correct folder or the file isn’t executable. Run:
cd /www/wwwroot/yourdomain.com
chmod +x openlitespeed.sh
./openlitespeed.sh This means either you’re not on an aaPanel server with Nginx installed in the standard location, or Multi-WebServer is not enabled the way the script expects. The script checks for common aaPanel paths and stops safely if they’re missing.
The script tries alternative reload methods (reload, then restart if needed). If it still fails, open aaPanel and go to App Store to confirm Nginx is installed and running.
Clear all caches: LiteSpeed Cache plugin, Cloudflare, browser cache. Old asset URLs may still be served from cache. Also verify WP Ghost is configured correctly by checking the Frontend and Login Tests in WP Ghost > Change Paths.
Use the Safe URL parameter to bypass WP Ghost temporarily. If that doesn’t work, see the Emergency Disable guide.
Yes, in most cases. The script creates an extension snippet that aaPanel’s Nginx includes automatically. If aaPanel updates remove the snippet or change the Nginx config structure, re-run the script. You don’t need to re-run it when changing WP Ghost path settings since the fallback rule works for any rewritten path.
No. If you use OpenLiteSpeed without Nginx in front, WP Ghost works through .htaccess rewrite rules automatically, just like Apache. This guide is only for the Multi-WebServer setup where Nginx is the reverse proxy in front of OpenLiteSpeed. See Configure .htaccess in OpenLiteSpeed for standalone OLS setups.
No. Real static files that exist on disk are still served directly by Nginx (fast). Only rewritten URLs that don’t match real files are forwarded to OpenLiteSpeed. This is the same “try file, then forward” pattern used by most Nginx reverse proxy setups.
No. WP Ghost uses .htaccess rewrite rules (processed by OpenLiteSpeed) and WordPress hooks for application-level changes. The script modifies only Nginx extension snippets in the aaPanel config directory. No WordPress core files are modified.
Server panel and OpenLiteSpeed configuration:
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.…