WP Manifestindependent plugin directory
manifest / updates / prevent-update-errors-wpe

Prevent Errors After Theme & Plugin Updates on WP Engine

Prevents "Call to undefined function" errors right after plugin, theme and translation updates on WP Engine by making PHP re-check updated files instead of running stale cached code.

★ 0stars
4release downloads
v1latest · 1mo ago

Install

Download prevent-update-errors-wpe.zip From the v1 release on GitHub, Sep 10, 2026

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/wpexplorer/prevent-update-errors-wpe/releases/download/v1/prevent-update-errors-wpe.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Prevents "Call to undefined function" errors right after plugin, theme and translation updates on WP Engine.

Download

Download prevent-update-errors-wpe.zip

[!IMPORTANT] Use the link above, not the green Code → Download ZIP button. GitHub names that archive after the repository and the branch, so you'd end up with a plugin folder called prevent-update-errors-wpe-main. WordPress tracks active plugins by folder name, so installing the correctly named version later would leave you with two copies in your plugins list.

The problem

WordPress clears PHP's OPcache with opcache_invalidate() when it updates a plugin or theme. On WP Engine that function is unavailable to WordPress, and PHP only re-checks a cached file for changes every 20 seconds (opcache.revalidate_freq=20). For up to 20 seconds after an update, a site can run a mix of old and new files, and code added or renamed in the new version can throw a fatal error that disappears on refresh.

How it works

From the moment an update starts until 60 seconds after it finishes, the plugin sets opcache.revalidate_freq to 0. PHP then re-checks every file it loads and replaces stale cached copies immediately.

  • Covers single, bulk and automatic plugin, theme and translation updates, plus WP-CLI.
  • Loads before other plugins so their files are covered too.
  • Only runs on WP Engine when WordPress cannot clear OPcache itself.
  • Outside an update window, PHP runs exactly as the host configured it.

Installation

  1. Go to Plugins → Add New → Upload Plugin.
  2. Choose the zip, click Install Now, then Activate.

Or unzip and upload the prevent-update-errors-wpe folder to wp-content/plugins/.

There are no settings.

Updating

This plugin does not check for or install updates automatically. WordPress won't tell you when a new version is out, so you'll need to update it yourself: download the latest zip, then either upload it again through Plugins → Add New → Upload Plugin (WordPress will ask if you want to replace the existing version) or overwrite the folder over FTP.

To hear about new versions, click Watch → Custom → Releases at the top of this repository.

Requirements

  • WordPress 6.0+
  • PHP 8.0+

License

GPLv2 or later. See license.txt.

This plugin is not affiliated with or endorsed by WP Engine.

Releases

1 release. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1 latest
Sep 10, 2026 1mo ago
prevent-update-errors-wpe.zip
4