Title: PHP Fatal error: Cannot redeclare class Yoast_Google_CacheParser
Last modified: September 27, 2016

---

# PHP Fatal error: Cannot redeclare class Yoast_Google_CacheParser

 *  Resolved [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/)
 * Hi,
 * I just upgraded to Yoast 3.6 and I’m getting many PHP Fatal errors:
 * PHP Fatal error: Cannot redeclare class Yoast_Google_CacheParser in /plugins/
   google-analytics-for-wordpress/vendor/yoast/api-libs/google/io/Google_CacheParser.
   php
 * I know the error is for the google-analytics-for-wordpress plugin, but I did 
   not have this error prior to upgrading to 3.6 from 3.5.
 * And google-analytics-for-wordpress is not working with Yoast SEO active.
 * I will rollback for the time being and wait for an update.
 * Thank you.

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

 *  Thread Starter [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8225908)
 * By the way, I’m using Google Analytics by MonsterInsights 5.5.2.
 * I can confirm that rolling back to 3.5 fixed the issue.
    -  This reply was modified 9 years, 8 months ago by [janvitos](https://wordpress.org/support/users/janvitos/).
 *  [alleyoopster](https://wordpress.org/support/users/alleyoopster/)
 * (@alleyoopster)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8225964)
 * Just to let you know I’ve upgraded to 3.6 and have Google Analytics by MonsterInsights
   5.5.2 and do not have an issue.
 *  Thread Starter [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8225995)
 * Interesting. Do you have any caching mechanism ? Because the issue only seemed
   to happen after I cleared the cache.
    -  This reply was modified 9 years, 8 months ago by [janvitos](https://wordpress.org/support/users/janvitos/).
 *  [alleyoopster](https://wordpress.org/support/users/alleyoopster/)
 * (@alleyoopster)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8226102)
 * I use W3 Total Cache and have since cleared the cache, all is good. Maybe try
   disabling the cache?
 *  Thread Starter [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8226148)
 * Disabling the cache does not fix the issue.
 * I must also note that I’m using Google Analytics Top Content Widget for displaying
   top posts from Google Analytics below my articles.
 * That’s where the problem seems to happen since the bottom of my pages are broken/
   not displayed with 3.6.
 * Reverting back to 3.5 is all good.
 * I also tried reinstalling 3.6 from scratch with the same issue.
 *  Thread Starter [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8226164)
 * There might be a require instead of a require_once somewhere in 3.6 that wasn’t
   in 3.5 or that was already a require_once.
 *  Thread Starter [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8232584)
 * So I did more testing and was able to get 3.6 working by disabling the rest api
   and commenting out this line of code in wp-seo-main.php:
 * `add_action( 'init', 'wpseo_init_rest_api' );`
 * Maybe this is what’s also causing many problems for others…
 *  Plugin Support [amboutwe](https://wordpress.org/support/users/amboutwe/)
 * (@amboutwe)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8232679)
 * Can you please submit that to our [GitHub repository for Yoast SEO](https://github.com/Yoast/wordpress-seo/issues)?
   Thanks!
 * If you have not submitted an issue previously, this [guide](https://kb.yoast.com/kb/how-to-write-a-good-bug-report/#utm_source=support&utm_medium=forum&utm_campaign=support-link)
   will help you submit a complete report which may result in a faster resolution.
 *  Thread Starter [janvitos](https://wordpress.org/support/users/janvitos/)
 * (@janvitos)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8238607)
 * Will do so!

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

The topic ‘PHP Fatal error: Cannot redeclare class Yoast_Google_CacheParser’ is 
closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

## Tags

 * [conflict](https://wordpress.org/support/topic-tag/conflict/)

 * 8 replies
 * 3 participants
 * Last reply from: [janvitos](https://wordpress.org/support/users/janvitos/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/php-fatal-error-cannot-redeclare-class-yoast_google_cacheparser/#post-8238607)
 * Status: resolved