WP Plugin Automatic Updates

Automatic updates thru ApisCP randomly fail for certain plugins. Any idea what keeps causing this? I usually disable fortification, run updates in WP and then re-enable fortification.

WARNING: Lararia\Jobs\Job::Lararia\Jobs{closure}(): Update failed for jetpack-protect, falling back to versionless update: PHP Warning: Version warning: Imagick was compiled against ImageMagick version 1692 but version 1693 is loaded. Imagick will run but may beh

ERROR: Lararia\Jobs\Job::Lararia\Jobs{closure}(): failed to update plugin `jetpack-protect’: PHP Warning: Version warning: Imagick was compiled against ImageMagick version 1692 but version 1693 is loaded. Imagick will run but may behave surprisingly in Unknown

Here is what I see when I manually tried to update via ApisCP:

failed to update plugin `jetpack-protect’: PHP Warning: Version warning: Imagick was compiled against ImageMagick version 1692 but version 1693 is loaded. Imagick will run but may behave surprisingly in Unknown on line 0 Warning: Could not move the old version to the upgrade-temp-backup directory. Error: No plugins updated (1 failed).

Run the migration from August 16 again, upcp -m '2024_08_16_134928_release-imagick-ref.yml' to ensure imagick extension is recompiled.

Due to a permission mismatch. To maintain fortification boundaries, these backend updates will run as the owner of the WordPress application. Looks like “jetpack-protect” created its directories directly from WordPress, which would have the owner “apache” rather than your user.

You can:

  1. chmod upgrade-temp-backup/ to 777
    • This works if no other users are on the account. Fast and dirty.
  2. Use ACLs: cpcmd -d DOMAIN file:set-acls /var/www/path/to/upgrade-temp-backup ACCOUNT-OWNER 7 '[default:true, recursive:true]'
    Next, run the same command without setting the default feature:
    cpcmd -d DOMAIN file:set-acls /var/www/path/to/upgrade-temp-backup ACCOUNT-OWNER 7 '[default:true, recursive:true]'
    • Adds read/write/execute permissions to the WordPress owner, which we’ll assume is “ACCOUNT-OWNER”. This is how Fortification works under the hood.
  3. Use a Manifest to add additional paths. Set the base to “wordpress”, define additional paths under the “max” key. Reapply Fortification, those new paths will be picked up.
    • Cleaner, portable. More work?

Thanks for the help, that worked!

1 Like