↑ ↓ select, Enter open, Esc close

Roll back a plugin to a specific version

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
user@server
wp plugin install contact-form-7 --version=5.9.8 --force --path=/var/www/vhosts/example.com/httpdocs

Downloads the given version from wordpress.org and overwrites the installed plugin files. --force is required because the plugin already exists. The activation status and the plugin settings in the database are kept.

Note: Only works for plugins from the official directory. If the new update migrated the database structure, the old version may still show errors.

Also searched as

  • undo plugin update wordpress
  • site broken after plugin update
  • install older plugin version

Related one-liners

All in WP-CLI

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.