WordPress is the world's most popular website builder, with more than 43% of the web being built on WordPress. While this makes it an obvious choice for building a new website, it also means that WordPress sites are a prime target when it comes to hacks.
The majority of WordPress websites that get hacked are due to an outdated WordPress core, plugins, or theme. Updates fix bugs and security vulnerabilities, and often add new features. With that in mind, it is highly recommended to always keep all aspects of your WordPress site up to date.
Here we detail the steps to update a WordPress plugin to the newest version either within the WordPress dashboard or via command line using WP-CLI.
Related Articles
Update WordPress Theme
Update WordPress Version
Install a WordPress Plugin
Log into WordPress Dashboard
Full and Partial Backups in cPanel
Enable/Disable Automatic Updates in WordPress
Find the Document Root of a Domain
Update Plugin from Dashboard
CAUTION: Updating WordPress can cause unexpected behavior or loss of functionality on your site. It is highly recommended to create a backup before proceeding with any updates.
- Log into the WordPress dashboard
- Navigate to Dashboard>Updates
- Under the Plugins section, click the checkbox next to the plugin(s) you wish to update, then click the Update Plugins button
Update Plugin using WP-CLI
- Access the server via SSH or using the Terminal in cPanel
- Navigate to the site's document root using the cd command
cd public_html
REPLACE: public_html with your domain's document root if different. See the guide on finding the document root of a domain for guidance. - List the currently installed plugins by running the following command
wp plugin list
- If the update column says available, you can update that plugin by running the following command
wp plugin update plugin_name
REPLACE: plugin_name with the plugin slug from the name column in the theme list.
EXAMPLE:wp plugin update akismet
TIP: Use the --all flag to update all plugins at once.
EXAMPLE:wp plugin update --all
- Repeat step 3 to confirm the plugin has updated successfully