Tutorial

How to Update a Plugin in WordPress

Keep plugins updated to increase the security of your WordPress website.

Why update plugins?

WordPress plugins are like any other piece of software. Developers frequently release updates to add new features and fix known bugs. You may not need the latest features of a plugin, but it is important to update so you are sure your website is running the most stable and secure version of the plugin.

Warning

Back up your website before updating plugins. Also, consult the release notes of the new version before updating a plugin. This will help you to identify problems that may happen if the plugin is updated.

One-click update

This is my preferred method to update plugins in WordPress. Go to Plugins in the WordPress admin bar. If a new version is available for a plugin, WordPress displays a message and you only need to click update now.

Link to update a plugin using the one-click method.

Automatic update

This is the easiest method to update plugins in WordPress. It is based on the auto_update_plugin filter. Add the following code and WordPress will update each plugin once a new version is available.

// Enable automatic updates for all plugins
add_filter('auto_update_plugin', '__return_true');

I do not like this method. One day something may be going wrong on your website and after spending precious time, you discover that the problem occurs because a plugin was updated automatically, but the latest version is incompatible with the active theme or other plugins.

Manual update

This method is rarely used as it is more complicated than other methods.

Step 1: Put your website in maintenance mode.

Step 2: Use FTP or cPanel and navigate to the plugins folder of WordPress. This folder is normally at wp-content/plugins inside the WordPress root directory.

Step 3: Identify the plugin files. A basic plugin is made of a single PHP file, but most plugins are stored as a directory inside plugins.

Step 4: Replace the plugin files with the files of the new version.

Step 5: Put your website out of maintenance mode and check that everything is working properly.

Further reading

I recommend the other tutorials in this series to learn more about managing plugins in WordPress.

Source code

The source code developed in this tutorial is available here.

WordPress

Related Tutorials

Open chat
Need help?
Hi! 🤝 Open the chat if you have any question, feedback, or business proposal. I would love to hear from you.