• Hello,

    I was wondering if anyone has already figured out how to easily replace files of a “corrupt”/”infected” WordPress plugin where it’s checksum fails (eg. file modified, file added, etc).

    The idea is that:
    1. First check plugins’ checksums with wp-cli’s “wp plugin verify-checksums”.
    2. Overwrite plugin’s folder content where verification fails due to above mentioned reasons.

    Preferably all of this should be achieved with wp-cli commands or at least combined with other shell commands (script) like wget same version of plugin’s .ZIP archive from wp.org repo.

    Cheers,
    Jenko

Viewing 3 replies - 1 through 3 (of 3 total)
  • Wouldn’t it be better to uninstall the plugin once and install it again?
    The core is updated by diffs, but the plugin is overwritten by updating.
    Below is an example of the WP-CLI command.

    Before updating, please make a backup so that you can roll back to the previous version in case of an emergency.

    First, you can display the installed plugins.

    wp plugin list

    If there are updates

    If there is an update, “available” will be displayed in the “update” section, so update the plugin.

    wp plugin update plugin name

    Reference article
    https://developer.www.ads-software.com/cli/commands/plugin/update/

    If there is no update
    Uninstall a plugin

    wp plugin uninstall plugin name

    Install a plugin

    wp plugin install plugin name

    Cheers,
    Asakawa

    Thread Starter jenkoanze

    (@jenkoanze)

    Dear Yukinobu,

    thanks for the advice!

    Wouldn’t reinstalling (uninstall & install) tamper with the site’s database?

    I’d like to achieve only for the files to be overwritten with no additional implementation (eg. plugin update to newer version, database tampering, settings reset, etc).

    I’m actually making a shell script that will serve for scanning “infected” WP plugins and if checksums aren’t verified, replace the current plugin dir with a fresh one.

    Hope the additional information helps.

    Cheers,

    Jenko

    Thread Starter jenkoanze

    (@jenkoanze)

    @yukinobu any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP CLI: Download plugin files from download.www.ads-software.com repo’ is closed to new replies.