• I tried to use PHP 8.1 on my WordPress 6.0.2 website.
    But most of the pages give me error:
    A critical error has occurred on your website

    So I downgraded back to PHP 7.4 and now WordPress 6.0.2 works wihout problems.

    Please tell me when WordPress will be working under PHP 8.1 since 7.4 is near the end of life.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • This is likely to be a plugin or theme issue. What happens if you disable all plugins and enable a WordPress Twenty^ theme?

    Thread Starter passegua

    (@passegua)

    Thanks for answering me.
    I am using Twenty Twelve theme.
    I set debug to true and this is what I get when shift from PHP 7.4 to PHP 8.1
    I suppose besides w3-total-cache and google-site-kit plugins there are also WordPress core issues:

    Deprecated: Redis::pconnect(): Passing null to parameter #2 ($port) of type int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/w3-total-cache/Cache_Redis.php on line 528
    
    Deprecated: Redis::pconnect(): Passing null to parameter #2 ($port) of type int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/w3-total-cache/Cache_Redis.php on line 528
    
    Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Admin/Standalone.php on line 95
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22
    
    Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28
    
    Notice: La funzione amp_is_available è stata richiamata in maniera scorretta. <code>amp_is_available()</code> (or <code>amp_is_request()</code>, formerly <code>is_amp_endpoint()</code>) was called too early and so it will not work properly. WordPress is currently doing the <code>init</code> hook. Calling this function before the <code>wp</code> action means it will not have access to <code>WP_Query</code> and the queried object to determine if it is an AMP response, thus neither the <code>amp_skip_post()</code> filter nor the AMP enabled toggle will be considered. It appears the plugin with slug <code>jetpack</code> is responsible; please contact the author. Leggi Debugging in WordPress per maggiori informazioni. (Questo messaggio è stato aggiunto nella versione 2.0.0.) in /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/functions.php on line 5831
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    
    Deprecated: filter_input(): Passing null to parameter #4 ($options) of type array|int is deprecated in /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/google-site-kit/includes/Core/Util/Input.php on line 64
    Errore sul database di WordPress: [Table 'Sql1345755_5.wp_termmeta' doesn't exist]
    SELECT term_id, meta_key, meta_value FROM wp_termmeta WHERE term_id IN (7313) ORDER BY meta_id ASC
    
    Fatal error: Uncaught TypeError: mysqli_num_fields(): Argument #1 ($result) must be of type mysqli_result, bool given in /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/wp-db.php:3547 Stack trace: #0 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/wp-db.php(3547): mysqli_num_fields() #1 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/wp-db.php(737): wpdb->load_col_info() #2 /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/w3-total-cache/DbCache_WpdbInjection_QueryCaching.php(218): wpdb->__get() #3 /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php(122): W3TC\DbCache_WpdbInjection_QueryCaching->query() #4 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/wp-db.php(2836): W3TC\DbCache_WpdbNew->query() #5 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/meta.php(1172): wpdb->get_results() #6 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/meta.php(644): update_meta_cache() #7 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/meta.php(571): get_metadata_raw() #8 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/taxonomy.php(1391): get_metadata() #9 /web/htdocs/www.sinapsi.org/home/wordpress/wp-content/plugins/download-manager/src/Category/CategoryController.php(228): get_term_meta() #10 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/class-wp-hook.php(307): WPDM\Category\CategoryController->wpdmproTemplates() #11 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/plugin.php(191): WP_Hook->apply_filters() #12 /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/template-loader.php(104): apply_filters() #13 /web/htdocs/www.sinapsi.org/home/wordpress/wp-blog-header.php(19): require_once('...') #14 /web/htdocs/www.sinapsi.org/home/wordpress/index.php(17): require('...') #15 {main} thrown in /web/htdocs/www.sinapsi.org/home/wordpress/wp-includes/wp-db.php on line 3547
    Si è verificato un errore critico sul tuo sito web.

    Hi,

    WP core supports 8.1 and so do many plugins and themes. I just updated a site on my dev server to 8.1 and it works fine. The site uses a Genesis child theme and mostly premium plugins.

    I suspect the twenty twelve may be one of the suspects. Can you test your site with a more recent twenty* theme?

    Try disabling W3-Total-Cache.

    EDIT:
    If that solves the fatal error, then try downgrading PHP to 8.0. Generally, it’s a good idea to check PHP compatibility with each plugin/theme’s developer and support community before making upgrades, especially to the latest version of PHP.

    • This reply was modified 1 year, 6 months ago by barnez. Reason: Added info about checking compatibility before upgrading PHP
    Thread Starter passegua

    (@passegua)

    Thanks for answering me.
    I eventually found the culprit!
    w3-total-cache plugin + PHP 8.1 = crash!

    Totally remove that plugin was not easy since I had to delete many folders besides empting all caches.

    But now PHP 8.1 run together wordpress 6.0.2 without any problem

    Thanks

    Happy to hear that you resolved the issue 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wordpress version 6.0.2 not working on PHP 8.1’ is closed to new replies.