How To Fix W3 Total Cache Error On Google Cloud Platform
When installed on WordPress hosted on the Google Cloud Platform or Amazon Web Service, you might see the error notification below. The W3 Total Cache experiences an error that prevents it from functioning. This error is caused by the plugin’s inability to edit the wp-config.php file of the WordPress installation. To fix this error, follow the steps listed below.
- Click on “View required change”
- Login to your Google Cloud Platform
- Go to Console
- Go to the compute engine dashboard.
- Click SSH on the installation you have your WordPress installed on
- When the SSH window finishes loading, execute the following command to navigate to the root directory of your WordPress installation.
- To open the wp.config.php file, execute this command.
sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php
- When your wp-config.php file has been opened for editing, scroll down till you see this line
/* That’s all, stop editing! Happy blogging. */
- Paste this code above it
/** Enable W3 Total Cache */
define(‘WP_CACHE’, true); // Added by W3 Total Cache
- Save your changes Ctrl+o and exit Ctrl+x
- Restart Apache server by executing this command
sudo /opt/bitnami/ctlscript.sh restart apache
- Purge all caches and refresh your page. That is the simple way to resolve the error
This is the simple way to fix the error W3 Total Cache experiences with WordPress hosted on the Google Cloud Platform.