Auto Install All Required WordPress Plugins in ONE GO | Add Plugin Dependencies for WordPress Theme

To start developing a WordPress site, we need essential plugins that we use on daily basis. Plugins that make our life easier. I can search plugins and install those plugins one by one that is a slow process or I can find a way to install them in one go.

I work with a lot of custom wordpress theme development. I have to install plugins again and again for every new site. So should I install plugins one by one each time for every new site? We have a way to not repeat this process every time. We can save time and install all required plugins in one go. Let’s do some automation in wordpress.

To do that search for ‘TGM Plugin Activation’ library. It’s not a plugin. Look for code at it’s configuration page. From download package page, you can customize and generate this library for theme, child theme or plugin. But I will use Github page. From github download file with name
class-tgm-plugin-activation.php. Keep this file in your theme directory.

In wordpress theme directory create a folder to place plugin zips files if you want to install plugins from there. There are PRO plugins that we can not download from WordPress plugins repository. This local folder for plugins to install is helpful in that way.

Open functions.php file from active theme. We need to add some code here from configuration page. It requires you to provide ‘plugin name’ and ‘plugin slug’ according to the official wordpress plugins page. To install plugins from directory inside theme folder, we will need to use source parameter.

Now when you go to plugins page from WordPress dashboard, you will see message there to install all plugins that we added in the config file. Click the install link and all plugins will be installed in one go. You don’t have to search each plugin every time and install plugins one by one.

Use this library to install them all plugins easily. You have to create configuration file containing plugins information only once. You can reuse this code snippet anytime in any theme.

Below is link to this code. You can copy that, modify that and use that. You will also have idea of plugins I use most often in every wordpress site. These are must have best plugins to use in every wordpress site.

So this is how you can accelerate process of plugins installation in wordpress site by providing required and recommended plugins. This is how you can require plugins and recommend plugin in theme. Theme may have plugins dependencies or if you just want to save time, this technique is for you. If you develop wordpress themes you can add plugin dependencies to the theme in this way. When I start a new wordpress site, I install all plugins in one go using this method.

✅ Download Code:
https://github.com/webstylepress/WordPress-Snippets/tree/Plugins-Auto-Install

I will try to update that list. Recommend me essential and best wordpress plugins to add in that list.

If you are a WordPress developer, follow us for tutorials on woocommerce, WordPress themes, WordPress plugins, creating WordPress website, best WordPress templates, maintaining a successful WordPress blog, installing WordPress on localhost or live environment and learn about WordPress free.

✅ Remove All Unused Images from WordPress Media Library, Clean Media Library with 100% Accuracy

✅ Bookly PRO Full Overview, Scheduling & Appointment Booking WordPress Site using Bookly PRO

✅ PayPal Sandbox & Live Setup for WooCommerce & Bookly PRO in WordPress

✅ Add Dynamic Country State City Dropdowns in WordPress Contact Form

✅ Hide All Traces of WP or WordPress, WordPress Security Tips, Hide WordPress Directories

✅ Convert Images to WebP in WordPress, Bulk Image Optimization to Speed Up WordPress Performance

✅ Fix Media Library Showing Blank Images in WordPress

✅ PayPal Personal, Business & Sandbox Accounts, WooCommerce & PayPal Payments

✅ Fix Schema, Structured Data, Errors & Warnings for WordPress Shopping Store to Improve Business

✅ UPLOAD FILE WITH ORDER in WooCommerce WordPress, Easy WooCommerce Order Customization

✅ Proper Redirect After Form Submission in WordPress, Custom & Manual Redirect & 3 WordPress Plugins

✅ Display Google Reviews for Business in WordPress, Google Reviews Slider, Widgets & Grid

Thank You!
👍 LIKE VIDEO
👊 SUBSCRIBE
🔔 PRESS BELL ICON
✍️ COMMENT

⚡Channel: https://www.youtube.com/webstylepress
⚡Website: https://www.webstylepress.com
⚡FaceBook: https://www.facebook.com/webstylepress
⚡Twitter: https://twitter.com/webstylepress
⚡GitHub: https://github.com/webstylepress
#WebStylePress #WordPress #WordPressTutorial #WordPressTraining #WordPressForBeginners #WordpressPlugin #WebDevelopment #WordpressDeveloper

You May Also Like