WP Ghost works on Google Cloud Platform with Apache configuration. Google Cloud’s default WordPress deployment sets AllowOverride None in the Apache config, which means .htaccess files are ignored. WP Ghost needs .htaccess rewrite rules to function. The fix is to enable mod_rewrite and change AllowOverride to All via SSH. This is a one-time server configuration step, and after it’s done, WP Ghost works normally.
Google Cloud’s WordPress images (via Deployment Manager or Marketplace) use Apache with AllowOverride None as the default. This is a security-conservative default that prevents .htaccess files from overriding server configuration. WordPress itself, most cache plugins, and WP Ghost all depend on .htaccess rewrite rules. Without AllowOverride All, WordPress permalinks, caching rules, and WP Ghost’s path security rules are all ignored by Apache. Enabling AllowOverride All also unlocks WordPress permalink support if it wasn’t working before.
Connect to your Google Cloud instance via SSH and enable the Apache rewrite module:
mod_rewrite:sudo a2enmod rewrite Already enabled? If mod_rewrite is already enabled, the command outputs “Module rewrite already enabled.” That’s fine. Proceed to Step 2.
Edit the Apache configuration to allow .htaccess files to override server settings:
sudo nano /etc/apache2/apache2.conf <Directory /var/www/> block and change AllowOverride None to AllowOverride All:<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory> Check the correct Directory block. The config file may have multiple <Directory> blocks. Make sure you edit the one for /var/www/ (your web root), not /var/www/html/ or another directory. If your WordPress installation is in a subdirectory, you may need to change the corresponding <Directory> block as well.
Restart Apache to apply the changes, then verify WP Ghost works:
sudo apache2ctl configtest Syntax OK, restart Apache:sudo service apache2 restart Apache isn’t processing .htaccess rules. Verify AllowOverride All is set for the correct directory in /etc/apache2/apache2.conf. Run sudo apache2ctl configtest to check for syntax errors. Confirm mod_rewrite is enabled with apache2ctl -M | grep rewrite. Restart Apache after any changes.
There’s a syntax error in apache2.conf. Run sudo apache2ctl configtest to see the specific error and line number. Common causes include unclosed <Directory> tags, extra characters, or editing the wrong block. Fix the error and try restarting again.
This confirms AllowOverride is still set to None. WordPress permalinks depend on .htaccess rewrite rules too. Once you set AllowOverride All and restart Apache, both WordPress permalinks and WP Ghost custom paths should work.
SSH back into your Google Cloud instance and either fix the Apache config or use the Safe URL parameter to bypass WP Ghost temporarily. If that doesn’t work, see the Emergency Disable guide to deactivate WP Ghost via SSH/SFTP.
Yes. Once mod_rewrite is enabled and AllowOverride All is set, the configuration persists across Apache restarts. You don’t need to repeat these steps. After this setup, WP Ghost writes to .htaccess automatically like any standard Apache server.
This guide is specific to Google Cloud’s default Apache configuration. Other cloud platforms (AWS, Azure, DigitalOcean) may have the same issue if their WordPress images default to AllowOverride None. The same fix applies: enable mod_rewrite, set AllowOverride All, restart Apache. The exact config file path may differ by distribution. See the Set AllowOverride All on Apache guide for distribution-specific paths.
This guide is for Apache-based deployments. If your Google Cloud WordPress instance runs Nginx, follow the Custom Nginx Config File guide instead. You can check your web server with apachectl -v (Apache) or nginx -v (Nginx) via SSH.
No. WP Ghost writes rewrite rules to .htaccess and uses WordPress hooks for application-level changes. No core files are modified. Deactivating WP Ghost restores all defaults instantly.
Apache and server 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.…