Title: WP Optimize Errors with WordPress/PHP Upgrade
Last modified: April 28, 2020

---

# WP Optimize Errors with WordPress/PHP Upgrade

 *  Resolved [shspivey](https://wordpress.org/support/users/shspivey/)
 * (@shspivey)
 * [6 years ago](https://wordpress.org/support/topic/wp-optimize-errors-with-wordpress-php-upgrade/)
 * I am upgrading my sites to the latest version of WordPress Multisite (5.4) and
   PHP (7.3.16) and I am now getting an error related to WP Optimize.
 * > Warning: file_put_contents(/opt/bitnami/apps/wordpress/htdocs/wp-config.php):
   > failed to open stream: Permission denied in /opt/bitnami/apps/wordpress/htdocs/
   > wp-content/plugins/wp-optimize/cache/class-wpo-page-cache.php on line 679
 * I checked file permissions on both the wp-config and class-wpo-page-cache.php
   files but they both appear accurate. I have also uninstalled and re-installed
   WP Optimize but I am still getting the error.
 * I am testing these upgrades on an internal dev site so I don’t have a public 
   URL I can provide for troubleshooting. Can someone suggest a way for me to troubleshoot
   and resolve this issue?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Marc Lacroix](https://wordpress.org/support/users/marcusig/)
 * (@marcusig)
 * [6 years ago](https://wordpress.org/support/topic/wp-optimize-errors-with-wordpress-php-upgrade/#post-12755634)
 * Hi there,
 * This is WP-Optimize trying to add the WP_CACHE constant in wp-config.php.
    You
   can try to disable the cache, save settings, and try enabling again.
 * If this doesn’t work, you can add the line manually:
 * `define('WP_CACHE', true); // WP-Optimize Cache`
 * (NB: this requires caching to be enabled, or at least the file “advanced-cache.
   php” to be present in the folder `wp-content`)
 * Marc.
    -  This reply was modified 6 years ago by [Marc Lacroix](https://wordpress.org/support/users/marcusig/).
 *  Thread Starter [shspivey](https://wordpress.org/support/users/shspivey/)
 * (@shspivey)
 * [6 years ago](https://wordpress.org/support/topic/wp-optimize-errors-with-wordpress-php-upgrade/#post-12759897)
 * Marc,
 * Thank you for the response, this is exactly what the problem was. I updated wp-
   config manually and all is well.
 * Scott

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP Optimize Errors with WordPress/PHP Upgrade’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

## Tags

 * [file_put_contents](https://wordpress.org/support/topic-tag/file_put_contents/)
 * [permission denied](https://wordpress.org/support/topic-tag/permission-denied/)

 * 2 replies
 * 2 participants
 * Last reply from: [shspivey](https://wordpress.org/support/users/shspivey/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/wp-optimize-errors-with-wordpress-php-upgrade/#post-12759897)
 * Status: resolved