Upgrading from PHP 7.4 to 8.0

PHP 7.4 is no longer supported. My host offers 8.0, so I upgraded, but WordPress failed to run.

Starting State

WordPress version 6.1.1
PHP 7.4 FastCGI

Error Description

Upgrading to PHP 8.0 FastCGI caused WordPress to show:

There has been a critical error on this website. Please check your site admin email inbox for instructions.

None of the WordPress pages worked, including the recovery page that WordPress emailed to me, wp-login.php?action=enter_recovery_mode.

Diagnosis

To diagnose the problem, I turned on debug logs by adding these lines to wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

This showed a fatal error in the wp-cache plugin. This was surprising because that plugin was disabled.

Solution

Moving the wp-cache directory from the plugins directory to another directory I created, plugins-old, fixed the problem.