Title: PHP8 Compatibility
Last modified: January 9, 2022

---

# PHP8 Compatibility

 *  [rexsorgatz](https://wordpress.org/support/users/rexsorgatz/)
 * (@rexsorgatz)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php8-compatibility-13/)
 * Upgrading to PHP8 throws fatal errors. Specifically:
 *     ```
       PHP Fatal error:  
       Uncaught Error: Undefined constant \"WP_Error\" in /nas/content/live/xyzhost/wp-content/plugins/google-news-sitemap/apgnsm.php:174
       Stack trace:
       #0 /nas/content/live/xyzhost/wp-content/plugins/google-news-sitemap/apgnsm.php(123): apgnsm_generate_sitemap()
       #1 /nas/content/live/xyzhost/wp-includes/class-wp-hook.php(305): apgnsm_autobuild(667644)
       #2 /nas/content/live/xyzhost/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(true, Array)
       #3 /nas/content/live/xyzhost/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
       #4 /nas/content/live/xyzhost/wp-includes/post.php(5148): do_action('publish_page', 667644, Object(WP_Post))
       #5 /nas/content/live/xyzhost/wp-includes/post.php(4368): wp_transition_post_status('publish', 'publish', Object(WP_Post))
       #6 /nas/content/live/xyzhost/wp-includes/post.php(4570): wp_insert_post(Array, false, true)
       #7 /nas/content/live/xyzhost/wp-admin/includes/post.php(423): wp_update_post(Array)
       #8 /nas/content/live/xyzhost/wp-admin/post.php(227): edit_post()
       #9 {main}
       thrown in /nas/content/live/xyzhost/wp-content/plugins/google-news-sitemap/apgnsm.php on line 174
       ```
   
 * Any chance the plugin can be upgrade to PHP8 compatibility? Thanks!

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

 *  Plugin Author [Andrea Pernici](https://wordpress.org/support/users/andreapernici/)
 * (@andreapernici)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php8-compatibility-13/#post-15236981)
 * I hope to be able to update it soon even if this plugin is no more needed considering
   Google News doesn’t use any sitemap at all now.
 * [https://support.google.com/news/publisher-center/answer/9607025?hl=en](https://support.google.com/news/publisher-center/answer/9607025?hl=en)
 *  [Yogesh](https://wordpress.org/support/users/yogeshbeniwal/)
 * (@yogeshbeniwal)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php8-compatibility-13/#post-15630373)
 * [@andreapernici](https://wordpress.org/support/users/andreapernici/) Are you 
   confirming that this plugin is no more needed while using feed in publisher center?
 *  Plugin Author [Andrea Pernici](https://wordpress.org/support/users/andreapernici/)
 * (@andreapernici)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/php8-compatibility-13/#post-15634235)
 * Yes Google no more need a sitemap for google news

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

The topic ‘PHP8 Compatibility’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-news-sitemap.svg)
 * [Andrea Pernici News Sitemap for Google](https://wordpress.org/plugins/google-news-sitemap/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-news-sitemap/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-news-sitemap/)
 * [Active Topics](https://wordpress.org/support/plugin/google-news-sitemap/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-news-sitemap/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-news-sitemap/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Andrea Pernici](https://wordpress.org/support/users/andreapernici/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/php8-compatibility-13/#post-15634235)
 * Status: not resolved