How to install multiple WordPress plugins at once?

As a server admin there is a time when you want to install fresh copy of WordPress plugins at once. This might be time consuming if we install them one by one from WordPress dashboard. Even downloading each plugins one by one and uploading them to server at once is waste of time. Here is what I do when it comes to install fresh copy of already installed plugins.

First of all, you need to go the the plugins directory of the website. Here I am in cpanel server. Let us suppose the username of website
is cpuser then

# cd /home/cpuser/public_html/wp-content/plugins

Note down the folder name of the plugins in a text file somewhere in your local machine. For example

# vi plugins.txt

The content of the plugins.txt is as follows:

contact-form-7
wordpress-seo
tablepress

Above is just a sample, it may be a longer list if you use many of them. But make sure they are not premium plugins.

Now, remove all of the plugin folders and put your plugins.txt file in plugin folder. Now comes part where magic happens. Enter the following command to download all the plugins at once.

# for plugins in $(cat plugins.txt); do wget https://downloads.wordpress.org/plugin/$plugins.latest-stable.zip; done

All of the plugins will be downloaded in no time.

What’s next?

Well, now comes the cleaning part. Now you have fresh copy of plugins, bunch of zip files and plugins.txt. You may not want to keep zip and plugins.txt file there so remove them.

# rm -rf "*.zip"
# rm plugins.txt

You are good now. You have successfully downloaded fresh copy of WordPress plugins.

Leave a Reply

Your email address will not be published. Required fields are marked *