0 votes
by (1.4k points)

I got following error message on every page including sitemap_index.xml

Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /public_html/wp-includes/functions.php on line 3464

I use Ubuntu OS with PHP 7 with WordPress CMS.

1 Answer

0 votes
by (10.2k points)
edited by

Yea, many web hosting service providers updating the version of old PHP to PHP 7. However, not all themes and plugins are still compatible with the new change. That's why you may face this type of errors. The solution is dealt with W3 Total Cache plugin. 

Let's follow the steps,

  1. Navigate to public_html\wp-content\plugins\w3-total-cache\lib\W3\Plugin\TotalCache.php

  2. search for ob_callback(&$buffer)

  3. Clue: It may on line No. 512

  4. Remove & sign, so it becomes ob_callback($buffer)

  5. Done

(Source: https://www.itnota.com/fixing-php7-compatibility-issue-w3-total-cache)