Request help for updating to WordPress 6.1.1

I am having problems updating to WordPress version 6.1.1. My current Pressbooks installation is as follows:

  • PHP version 7.4
  • WordPress version 6.0.3
  • Pressbooks plugin version 6.3.0
  • Aldine theme version 1.17.0
  • McLuhan theme version 2.23.0 or 2.24.0 (?) (I downloaded pressbooks-book-2.24.0.zip from Github and installed it, but the version still shows up as 2.23.0)

Additional installed plugins are Duplicator Pro, H5P, Wordfence Security, and WP QuickLaTeX. All are up to date.

I duplicated my public site to a staging site and tried the following update attempts, each time starting from a fresh duplicate of my public website. Unfortunately, all attempts failed.

Attempt 1.

  • In WordPress Updates page, I clicked on the “Update to version 6.1.1” button.

After the update, I get the error message “Service Unavailable. The server is temporarily unable…” I read various internet articles that explained that this is not a problem with the server, but likely a conflict with a plugin or a theme. I tried various suggested diagnostics and it appears that the conflict is with the Pressbooks plugin.

Attempt 2.

  • Network Deactivate the Pressbooks plugin.
  • Update WordPress to version 6.1.1. This time, the update appears to be successful.
  • Network Activated the Pressbooks plugin. Again, I get the “Service Unavailable” error.

Attempt 3.

  • Network Deactivate the Pressbooks plugin.
  • Update WordPress to 6.1.1 (successful).
  • Change PHP to version 8.0
  • Update Pressbooks to 6.4.0 and Network Activate (successful).
    However, when I try to edit a book, I get the error message: “There has been a critical error on this website.”

Attempt 4.
Repeat Attempt 3 and plus update the McLuhan and Aldine themes to their latest versions (2.24.1 and 1.18.0 respectively). However, I still get the critical error.

I looked at the php error log on the server, and the in all the attempts, the error is “There was a problem with \Pressbooks\session_start(), headers already sent!”

I would appreciate any suggestions on how I can update my site.

Many Thanks.

I was also struggling a bit, but was finally successful with your recipe in attempt 4.

I also keep seeing “There was a problem with \Pressbooks\session_start(), headers already sent!” in my debug.log, but it has no consequences to me, e.g. my site is running perfectly despite the warnings.

So, I cannot help but tell you that the warning is likely not the cause for your “critical error.”

Are you certain that php8.0 is used on the site? It could be installed but not loaded by your website because it is not linked? You can check with https://yourwebsite/info.php and check Loaded Configuration File (For Apache). Or “php -v” in the console.

Also note that current Pressbooks version wants php8.0 and NOT php8.1.

Thanks for your response. Yes, I am certain that php8.0 was used on the site when I tried Attempts 3 and 4. As I recall, Pressbooks 6.4.0 would not install if the php version is below 8.