Title: PHP 8 failed
Last modified: October 25, 2021

---

# PHP 8 failed

 *  Resolved [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/)
 * Good evening,
 * Following the site stats, I updated my site from php 7.3 to 8.
    The site failed
   completely. I stepped back to php 7.4, and it’s coming OK. Why can I not set 
   it on php 8 ? My WordPress version is 5.8.1
 * Thank you in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-8-failed%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [Yui](https://wordpress.org/support/users/fierevere/)
 * (@fierevere)
 * 永子
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003413)
 * WordPress 5.8 does support PHP 8, however your plugins and theme might not (yet).
 * Please check your server’s PHP error log to find where its failed.
    Also you 
   may find this article useful: [https://wordpress.org/support/update-php/#before-you-update-your-php-version](https://wordpress.org/support/update-php/#before-you-update-your-php-version)
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003518)
 * Thank you for your answer.
 * I’m afraid to give a too long answer if I copy the complete server’s php error
   log: here an extract:
 *     ```
       [Sat Oct 23 21:35:19.564026 2021] [lsapi:error] [pid 18902:tid 47797286262528] [client 80.13.110.135:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 487424 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 591\n
       [Sat Oct 23 21:35:13.364848 2021] [lsapi:error] [pid 30286:tid 47797324084992] [client 80.13.110.135:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-functions.php on line 126\n
       [Sat Oct 23 21:28:39.289381 2021] [lsapi:error] [pid 18902:tid 47797307275008] [client 157.55.39.102:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 1241088 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 849\n
       [Sat Oct 23 21:27:00.432978 2021] [lsapi:error] [pid 8173:tid 47797324084992] [client 157.55.39.58:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 1241088 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 849\n
       [Sat Oct 23 21:21:54.855241 2021] [lsapi:error] [pid 16312:tid 47797311477504] [client 37.168.100.235:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 1273856 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 849\n, referer: https://www.google.com/
       [Sat Oct 23 21:21:48.496265 2021] [lsapi:error] [pid 16312:tid 47797317781248] [client 37.168.100.235:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 1273856 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 849\n, referer: https://www.google.com/
       [Sat Oct 23 21:17:04.933520 2021] [lsapi:error] [pid 9103:tid 47797296768768] [client 80.13.110.135:0] [host librairiedamase.com] Backend fatal error: PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /home/moko9154/public_html/prod/wp-content/plugins/woocommerce/includes/class-wc-product-attribute.php on line 1\n, referer: https://librairiedamase.com/wp-admin/post.php?post=8441&action=edit
       ```
   
 * In the rest of the error log, most of the lines include Autoptimize plugin.
    
   The best solution should it to contact the plugin creator?
 * Kambro
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003577)
 * Afraid memory issues are not necessarily attributable to the plugin (or theme)
   being mentioned in the PHP errorlog, in this case Autoptimize (or Jetpack or 
   Woocommerce) just seems to be the straw that breaks the camel’s back, you will
   likely either have to increase memory available to PHP or alternatively to disable
   some plugins (or switch themes) to decrease memory footprint.
 * hope this clarifies,
    frank
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003620)
 * Thank you, Frank, for your speed answer.
    You are 100 % right. Strangely, when
   I switch to php 8, the Cpanel goes down the memory to the minimum. I set it higher(
   1024M), and all is OK. Thank you once agan and “beste groeten aan de gentenaars!”(
   I’m staging in France these years).
 * Kambro
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003638)
 * I wrote too fast.
    The backend failed :
 *     ```
       Cette extension n’a pas pu se charger correctement et a été mise en pause dans le cadre du mode de récupération.
   
       Une erreur de type E_ERROR a été causée dans la ligne 1272 du fichier /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeImages.php. Message d’erreur : Uncaught ValueError: Unknown format specifier "C" in /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeImages.php:1272 Stack trace: #0 /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeImages.php(1272): sprintf() #1 /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeImages.php(1306): autoptimizeImages->get_imgopt_status_notice() #2 /home/moko9154/public_html/prod/wp-content/plugins/autoptimize/classes/autoptimizeCacheChecker.php(98): autoptimizeImages::get_imgopt_status_notice_wrapper() #3 /home/moko9154/public_html/prod/wp-includes/class-wp-hook.php(303): autoptimizeCacheChecker->show_admin_notice() #4 /home/moko9154/public_html/prod/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #5 /home/moko9154/public_html/prod/wp-includes/plugin.php(470): WP_Hook->do_action() #6 /home/moko9154/public_html/prod/wp-admin/admin-header.php(287): do_action() #7 /home/moko9154/public_html/prod/wp-admin/index.php(115): require_once('/home/moko9154/...') #8 {main} thrown
       ```
   
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003668)
 * I’ve seen that error once before and if I remember before that turned out to 
   be due to an issue in the translation strings, can you switch your admin language
   to English to see if the problem persists Kambro?
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003691)
 * Once again, you are right: after switched to English, the backend runs good… 
   but I will incur the wrath of my sister, the owner of the store, who does not
   know English well.
    Now that the problem has been identified, is there a solution?
 * Thanks 1000 times for your answers.
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003727)
 * I [made a translation suggestion](https://translate.wordpress.org/projects/wp-plugins/autoptimize/stable/fr/default/?filters%5Btranslated%5D=yes&filters%5Bstatus%5D=waiting)
   to correct it, but it needs to get approved by the FR language editors.
    -  This reply was modified 4 years, 6 months ago by [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/).
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15003787)
 * Good. I’ll switch to PHP 7.4 waiting to the solution of the translation.
    Best
   regards.
 * Kambro
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15014400)
 * Good morning,
 * Since the latest Autoptimize translation update, it’s OK also with PHP 8.
    Thank
   you very much, Frank.
 * Now, since the switch to PHP, I cannot any way turn on imagick and I receive 
   this message in the Site Health report : “Le module facultatif, imagick, n’est
   pas installé, ou a été désactivé.”
    In when I was in the former PHP version, 
   there was a checkbox “imagick” that don’t appear anymore.
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15014744)
 * maybe check with your host?
 *  Thread Starter [kambro](https://wordpress.org/support/users/kambro/)
 * (@kambro)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15015269)
 * I did it. They fixed the problem. It’s OK for all.
    Thanks to all the helpers.
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15015535)
 * You’re welcome 🙂 As far as Autoptimize is concerned; feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * groeten uit Lokeren,
    frank

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

The topic ‘PHP 8 failed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 13 replies
 * 3 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/php-8-failed/#post-15015535)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
