Several comments
-
just in case, you probably should check that the PHP version is 5.5 and above before calling the function (or check for its existence, not sure if an equivalent function existed in the original APC under the same name)
-
You priority is too high. You actually want to call it after all other plugins have finished whatever they are doing after an upgrade, just in case they do something that impacts any PHP files. Go for a priority of
PHP_INT_MAX -1
.
Your code might actually get triggered too many times if there are several upgrades done in the same time but except for slight performance hit I don’t see anything bad that might come out of it.
Related Posts:
- Website not updating – no cache plugins active!
- How to keep cache files after plugin update?
- WordPress Not updating – No Cache Plugins, Admin sees updates
- Updating WordPress or plugins causes site issues (due to API, I think)
- Get rid of Another update is currently in progress
- What is your best practice to execute one-time scripts?
- No CSS being loaded on backend
- Enable update notification, disable updates
- Set custom messages for post update/save
- WordPress 3.9 Database Update Infinite Loop
- Real automated and unattended wordpress upgrade including plugins
- Auto-updating WordPress from a local zip file
- Permissions to get autoupdate to work
- Disable requests to api.wordpress.org
- Why can’t I update username through WordPress API?
- Does set_transient() overwrite/update transient option with same key?
- Permissions to wp-content folder in Windows Server 2012
- Why is Google Webmaster Tools telling me to update WordPress
- Update, add, remove plugins, themes or wordpress behind load balancer
- How to force function to run as the last one when saving the post?
- git and local wordpress: how to handle wordpress updates?
- Block updates by Server
- WordPress 5.5 AutoUpdate schedule
- WordPress Version 5 – Another update is currently in progress
- register_activation_hook and updating
- Using wp-cli to Update WP Networks / Multisite from 3.5.1 to 3.8
- What are the details for function argument wp_update_plugin()
- Check if any users are logged in before running update
- wp core update not working anymore
- Changing plugin slug with update
- Necessary user, group and permissions for core updates
- Update Failed: There has been a critical error on your website
- How to notify my plugin users about new version releases?
- Can’t update WordPress, need to reboot the VPS
- What are the properties of $item passed in the auto_update_{$type} filter?
- Good methodology for upgrading a large/complex sites?
- Why does One Click Update fail on localhost using FTP with 777 permissions on site files?
- Auto backup before automatic WordPress updates
- WordPress not showing upgrade to latest version
- Why does WordPress 4.2.2 require FTP to update?
- Updating client websites on a regular basis
- Why won’t WordPress on localhost find updates?
- How to do an event when any user updates their profile?
- Some wp-admin folder file deleted when WordPress upgrade
- Should I upgrade?
- How to display user’s nickname by default instead of username
- Apply a tag to every images ‘Link Rel’
- Download failed cURL error 7: . Can’t update anything
- Upgrading from 3.5.2 to 3.9.1
- Check for files and database integrity
- Install translation files that should survive updates [duplicate]
- Error updating WP-CLI
- Fresh new install or keep old version
- How to add new theme to running website
- Updating WordPress core with zero downtime – I mean zero
- Automatic updates and merging manual changes
- WordPress curl timing out and saying ‘Moved Permanently’
- New version doesn’t show up
- Updating a page won’t have any effect
- How does one dismiss the ‘upgrade notice’ when managing upgrades with SVN?
- Keep getting update notifcations despite there is nothing to update
- Is the root index.php file part of the Core?
- Why would a WordPress site go into maintenance mode without me doing anything?
- 3.1 update erases customized function page?
- theme upgrade failing
- cannot update wordpress from 3.4.2 to 3.5
- After adding mo localization files to WP 3.8.1 install backend shows new update to 3.8.1
- How to back up and up date a site to a newer version?
- What do WordPress auto updates include?
- How to automate post update website check?
- Which directories does WordPress attempt to create when updating core and installing plugins?
- Constant for ‘barebones’ update of WordPress
- Reliability of WordPress 4 one click update
- Can an update corrupt my installation?
- Can I Update WordPress 2.9.2. to 3.0.4 from admin
- WordPress current version is 5.7.5 but I’m being prompted to “upgrade” to 4.9
- Updating wordpress from my Linux distro’s repository
- Can not save changes after an edit
- Admin keeps showing pending translation update
- Auto Update A WordPress Plugin from within another WordPress Manager Plugin
- How to force an update of WordPress core to a newer minor version, using the Dashboard?
- What happend if I update my website?
- How does WordPress get the upgrade URL?
- Remote site behind VPN – how to allow core & plugin updates?
- Automating svn updates from a server-side cron job
- Issue after WordPress update
- Correct procedure for fixing broken WP sites after WP version update
- Update WordPress from non-public machine
- cannot update ftp credentials even when group owner has write access
- WordPress NOT notifying of new update in dashboard
- What could have changed all of the ' characters in my content to ' strings?
- Updating from WordPress 3.5.2 to 3.6 Errors
- Autoupdate shows current when I’m on 3.1
- Restoring from a Backup after Update
- If I place custom files in WordPress root, will they be deleted?
- WordPress 4.8.2 redirects back after install and asks to delete/change config
- Is updating from a zip file the same as a regular update? [closed]
- cURL error 28: SSL connection timeout while can download the plugin file
- WordPress recommending to downgrade instead of upgrade?
- WordPress is updating only patch version and not minor