WPBakery fix

WPBakery Fatal Errors After a PHP 8 Upgrade: What Broke and Why

The error names a file inside js_composer, the folder WPBakery lives in, and it appeared the day the host changed PHP. An old copy of the builder uses syntax that PHP 8 removed, and the theme's add-ons for it are often older still. The message in the log tells you which of the two failed, and that decides the repair.

hosting panel · php error log
PHP error log
The morning after the PHP switch
Fatal
  1. [02:00] PHP version changed by host: 7.4 -> 8.2
  2. PHP Fatal error: Array and string offset access syntax
  3. with curly braces is no longer supported in
  4. wp-content/plugins/js_composer/include/classes/editors/
  5. class-vc-frontend-editor.php on line 644
  6. Deprecated: Required parameter $content follows optional
Illustrative — one old file stops the whole builder from loading1 fatal

What you are seeing

  • A critical error screen, with a log entry pointing into wp-content/plugins/js_composer
  • Deprecated and warning lines printed across the top of pages
  • The site loads, but the backend or frontend editor will not open
  • Pages save forever, or the editor reports a failed update
  • WordPress emailed to say it paused WPBakery or the theme's core plugin

Why it happens on WPBakery

Most common first.

  1. 1

    Syntax that PHP 8 no longer accepts

    Old js_composer releases contain code PHP 8 refuses to load, the best known being curly-brace offsets such as $string{0}. That failure is absolute. The file cannot be read, so the plugin cannot start, and every page that depends on it fails with it.

  2. 2

    Theme-made elements older than the builder

    Bundled builders come with elements the theme added, registered from the theme or its companion plugin, plus template overrides in a vc_templates folder inside the theme. Those were written once and rarely revisited. Updating WPBakery alone leaves them calling functions PHP has since removed.

  3. 3

    Notices leaking into the editor's traffic

    Newer PHP versions flag old habits as deprecated: optional parameters ahead of required ones, properties created on the fly. Deprecations do not stop a page. When they are displayed, though, they are printed into the responses the editor expects to be clean data, and saving or loading the builder fails.

  4. 4

    Add-on packs built for the old builder

    Third-party add-on bundles for WPBakery, the kind that add dozens of extra elements, carry their own old code and their own update channel. One of them is often the file named in the error while WPBakery takes the blame.

  5. 5

    Recovery mode switched the builder off

    After a fatal error WordPress can pause the plugin responsible so the dashboard stays reachable. With js_composer paused the errors stop and every builder page prints raw tags instead. It looks like a second fault and is the first one, contained.

How to fix it, in order

Least invasive first. Stop at the step that fixes it.

  1. 1

    Get the exact message

    Find the PHP error log in the hosting panel, or the details in WordPress's recovery email, and copy the full line. The path tells you whose code failed. A path under plugins/js_composer is the builder. A path inside your theme or its companion plugin is the theme's add-on code. Any other plugin folder is an add-on pack.

  2. 2

    Buy time by setting PHP back, with a date attached

    Most hosting panels let you choose the PHP version per site. Return to the previous one to get the pages up, and ask the host how long that version will stay available. That date is your deadline for the remaining steps.

  3. 3

    Stop warnings from printing while you work

    In wp-config.php, turn WP_DEBUG_LOG on and set WP_DEBUG_DISPLAY to false, so notices go to a log file and not into pages or editor responses. Where deprecation notices were the only problem, this often brings the editor back on its own.

  4. 4

    Bring the builder current through the route that applies

    Check the WPBakery version on the Plugins screen. A bundled copy updates through the theme: update the theme, then its bundled plugins. A directly licensed copy updates under Plugins once it is activated in WPBakery Page Builder, Product License. Current releases are built for PHP 8.

  5. 5

    Update or retire the theme's add-on code

    Update the theme's companion plugin and any add-on packs to their newest versions. Look in the theme folder for vc_templates, which holds the theme's overrides of WPBakery's element templates, and check the file dates. If the theme has no newer release, the elements it added need replacing with standard ones.

  6. 6

    Prove it on staging before moving PHP forward again

    Switch a staging copy to the new PHP version. Load a page of each type, open both the backend and frontend editors, save a change and reload. Read the log afterward. When it stays quiet, schedule the live switch yourself instead of waiting for the host's date.

Keep it from coming back

  • Ask your host for its PHP retirement schedule and put the dates on a calendar
  • Test each new PHP version on staging as soon as the host offers it
  • Keep the builder, the theme and its add-on packs updated as a set
  • Leave error display off on the live site and logging on

The permanent fix

A faster Next.js build, with a CMS made for your business

PHP will keep moving, about once a year, and each release asks the same question of the same old code. If answering it means waiting on a theme author who has stopped answering, the builder is now the oldest thing on the server and everything else is scheduled around it. A site rebuilt in Next.js is served as static pages, so a visitor's request never passes through PHP or a builder, and the custom CMS behind it is maintained as part of the same codebase.

On WPBakery todayOn Next.js with a custom CMS
What you keep updatedWordPress, the theme, its builder and every bundled plugin, all in stepNothing on a schedule. There is no theme or plugin stack to fall out of step
How a page is servedBuilt from the database on each visit, through the theme and its builderBuilt ahead of time and served as finished files from servers near the visitor
How you edit itA general-purpose builder with every option the theme shipsA CMS built around what your business actually changes: services, prices, photos, posts
What can break itAn update to any one of those parts, or a license that lapsesA change someone makes on purpose, tested before it goes live

Your content, your addresses and your rankings come with you: every page is moved, every old address is redirected, and you get a login to an editor that only shows what you need. A repair is still the right call for many sites, and we will say so when it is.

Free · No obligation

Want this fixed on your WPBakery site?

Tell us what you are seeing. We look at the site, tell you plainly what is wrong and what it takes, and quote a fixed price before any work starts.

Which of these sounds like you? (pick any)

Frequently asked

Current releases do. The trouble is almost always an old copy, typically one bundled with a theme and never updated since. Compare the version on the Plugins screen with the builder's current release before concluding anything about the plugin itself.

Not directly. The file belongs to the theme's own elements or to its template overrides for the builder. Updating WPBakery will not change that file. It needs a theme update, a patch in a child theme or a replacement for the element.

Deprecation notices are being printed into the data the editor exchanges with the server, and the editor cannot read the result. Turn off error display so notices go to the log only. If saving works afterward, nothing was broken, only noisy, though those notices preview what a later PHP version will refuse outright.

Yes, and for a single syntax error it can be a sensible stopgap. Every edit inside the plugin folder is lost at the next update, and an old copy usually has more than one such line waiting. Treat a hand patch as a way to reach a proper update, with a note of what was changed.

Keep reading

CallGet a quote