⚠️ Imagen generada con IA / Image generated with AI · Traducción al inglés realizada con IA / English translation by AI
La escena es conocida: «es una actualización menor, no pasa nada». WordPress 7.1 llegó en agosto de 2026 y, para los que tenían WP Rocket activo, sí pasó algo. Algo gordo.
No era la caché. No era el CSS optimizado. Era un error fatal de PHP en la integración de Cloudflare del plugin, y este es el mensaje que alegró el día a más de uno:
PHP Fatal error: Uncaught TypeError: substr(): Argument #1 ($string)
must be of type string, int given
.../wp-content/plugins/wp-rocket/inc/ThirdParty/Plugins/CDN/Cloudflare.php:562
Traducción: WordPress 7.1 empezó a pasarle un número entero a una función que esperaba texto. El núcleo cambió una línea en silencio y el plugin se llevó la web por delante. Que conste que el plugin solo hizo lo que le tocaba: reventar con elegancia.
WP Rocket lo arregló en la versión 3.23.2.2 (artículo oficial de la KB y issue #8596 en GitHub). Si todavía no has actualizado: actualiza el plugin y se acabó el problema. Si la web ya está caída, sigue leyendo.
Si aún tienes acceso al panel:
Si te quedaste sin acceso al panel (vía FTP):
/wp-content/plugins/wp-rocket/ a wp-rocket-off.wp-rocket.Workaround manual: WP Rocket publicó un parche en la línea 562 de Cloudflare.php (un guard is_string()) y un drop-in de emergencia para mu-plugins. Funciona, pero lo suyo es quedarse con la actualización oficial.
Total, que si te ha tocado: no eras tú, era la 7.1. Respira, renombra la carpeta y actualiza el plugin. Y la próxima vez, ya sabes: los lunes, y con backup.
Post original en todomal.es
The scene is familiar: "it's a minor update, nothing will happen". WordPress 7.1 arrived in August 2026 and, for those running WP Rocket, something did happen. Something big.
It wasn't the cache. It wasn't the optimized CSS. It was a fatal PHP error in the plugin's Cloudflare integration, and this is the message that made someone's day:
PHP Fatal error: Uncaught TypeError: substr(): Argument #1 ($string)
must be of type string, int given
.../wp-content/plugins/wp-rocket/inc/ThirdParty/Plugins/CDN/Cloudflare.php:562
In plain terms: WordPress 7.1 started passing an integer to a function that expected a string. The core changed one line silently and the plugin took the site down with it. To be fair, the plugin just did what it was told: crash gracefully.
WP Rocket fixed it in version 3.23.2.2 (official KB article and issue #8596 on GitHub). If you haven't updated yet: update the plugin and you're done. If your site is already down, keep reading.
If you still have admin access:
If you lost admin access (via FTP):
/wp-content/plugins/wp-rocket/ to wp-rocket-off.wp-rocket.Manual workaround: WP Rocket published a patch for line 562 of Cloudflare.php (an is_string() guard) and an emergency drop-in for mu-plugins. It works, but the official update is the way to go.
So if it happened to you: it wasn't you, it was 7.1. Breathe, rename the folder and update the plugin. Next time you know: Mondays, and with a backup.
Original post at todomal.es