Coding Agency for Web Development » WordPress Plugins » How to Bulk Reinstall All Plugins in a WordPress Website Using WP-CLI?

How to Bulk Reinstall All Plugins in a WordPress Website Using WP-CLI?

READING TIME: MIN

> Skip the explanation, go to the wp-CLI command directly

It is no secret that sometimes every WordPress Administrator needs to re-install all of the website’s plugins. This can be necessary for many different situations. It can be done in various ways, but usually, it is boring and irritating. In this article, you will find all of the information on the topic you may need. Let’s dive in!

When WordPress plugins re-install is necessary?

There are different scenarios when bulk plugin re-installation is necessary.

  • Corrupted plugin installations;
  • Accidentally deleted files;
  • Incorrect permissions and ownerships;
  • Hacked WordPress plugins;

As you can see plugins re-install may come in handy in tough situations. A corrupted WordPress plugin installation may occur when the plugin has not been installed correctly – for example, the installation process timed out, or decompression of the plugin package went wrong.

Mass plugin re-install may be necessary if you have accidentally deleted plugin files and don’t remember which exactly they were.

Occasionally, the plugins may not work correctly due to incorrect file permissions and file ownerships. It will be better if you simply install them again.

However, plugins re-install is most necessary (even mandatory!) in a situation where your WordPress website has been hacked.

How to re-install WordPress plugins manually?

First of all our advice is always to take a backup of both your files and database before doing anything.

  Using SFTP for file management on WordPress

There are two manual methods to re-install your WordPress plugins:

  • Manual plugin re-install from the WordPress backend;
  • Manual plugin re-install from the hosting File Manager;

The first option is to reinstall your plugins from the WordPress back-end. All you have to do is disable the plugins (don’t worry, their settings and configurations are kept in the database). After that, search the plugins in the plugin library, install and activate them.

The second option is to replace the plugins from the File Manager of your hosting provider. What you need to do is to download the plugins’ zip files from WordPress.org, then go to your hosting provider’s File Manager section. You have to upload and unzip the archives in the wp-content/plugins folder. You don’t need to deactivate the plugins before that.

However, both of those options are too slow. Especially if you have way too many plugins.

How to re-install all of your WordPress plugins using a plugin?

Another method that you could opt to bulk-install WordPress plugins is by utilizing a tool like the WordPress Reset plugin. This plugin, apart from website reset and speeding up the development process, has a unique feature called “Collections” which allows you to create an unlimited number of collections of your favorite plugins (and themes) so you can bulk-install them whenever you decide.

  How to Use Bitcoin for WordPress Payments

The collections are stored in the cloud, so you can install them on multiple websites as well. Furthermore, the license keys are stored too. So,  everything is in one place and easily accessible. You can add as many plugins/themes to the collection, sort and name them by preference, or delete the collection if at some point one of them isn’t of use anymore.

How to re-install all of your WordPress plugins using WP-CLI?

The fastest method is to get rid of all your plugins is using WP-CLI. If you are not familiar with WP-CLI yet, you can learn about it at our specialized series related to WordPress and SSH control.

Keep in mind this method is for advanced users only.

All you have to do is to SSH to your server, make sure WP-CLI is present and run the following command:

wp plugin install $(wp plugin list ——field=name) ——force

This will re-install all the plugins presented in the repo. Keep in mind premium plugins will most probably require a manual re-install using one of the methods above.

That’s all – if you find this useful, we will be happy if you share the article or leave us a comment in the form below.

Tags:

Ivan Popov

Author Ivan Popov

CEO and lead developer at Vipe Studio. Certified open-water lifeguard and a Star Wars fan.