This solution should do the job for you.
http://tgmpluginactivation.com/
The solution is meant for theme developers to package to download, automatically install and activate multiple plugins that are either packaged with a theme, downloaded from the WordPress Plugin Repository or downloaded elsewhere on the internet (perhaps a private repository.
The code of the solution can be used to accomplish what you are trying to achieve. The code is also available on github athttps://github.com/TGMPA/TGM-Plugin-Activation.
Best of luck.
Related Posts:
- How to Add WYSIWYG Editor (tinyMCE) to plugin options page compatible with WordPress 3.0 and up?
- What is a Network Activated Plugin Exactly?
- How to get Login Error messages on a custom template
- Autogenerate wordpress shortcodes using array?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Run Python Script on WordPress Website
- Get product attribute for Simple product in WooCommerce
- do_action and hook methods
- Developer plugin to echo template names/filepaths [closed]
- I need to add a custom “cover” to every new post — plugin or custom setup?
- WordPress with CAS+LDAP and standard WP accounts
- Suspicious google tag manager
- Easy Digital Downloads (EDD) – Purchase Receipt emails couldn’t be logged
- Does codex.wordpress.org use a plugin of some sort? If so what plugin?
- Possible to add a language file to a plugin without adding .po/.mo files to plugin directory?
- Overriding Attributes values in Shortcode Plugins
- How to upload user profile image from frontend in wordpress ?
- How do you override the default comment template?
- Any Short code Availble for Get Post List With Thumbnail Plugin?
- Carbon Fields use in custom plugin class
- WordPress takes too much time (100 seconds) to load – Front end and back end
- Exclude post by custom meta with pre_get_posts
- Media upload not working on theme option in WordPress 3.8.1
- How would I disable a plugin on one page?
- Buddypress – Add the post_id in the bp_activity_add function
- WordPress site periodically goes down
- Server configuration for WordPress – Do I need install PHP-SSH extensions for WordPress on Fedora28?
- How to remove custom post type and add category and post name
- wp_footer hook only working on homepage not in other pages
- wp-custom-menu filter removes the current_page_item class
- Can I allow certain people to add/edit pages within a parent?
- Unable to select image using custom image field type
- jQuery | JJ Carousel Plugin – Can’t set speed [closed]
- How to use add_submenu_page() for editors?
- Determining when was the last time a plugin was activated
- My WordPress site when down after installing a plugin and now all I get is a simple white screen [closed]
- Override plugin styles via my custom theme
- Using ACF default value to autoincrement a number field
- A question about register_activation hook
- where do I send my ajax calls
- Changing menu order of a specific plugin in dashboard
- Images under 1MB are not being compressed
- Simulating a wp page – wp page load sequence
- issue in wp_localize_script
- Sanitize $_GET variable when comparing
- Where can I save plugin data?
- echo get_option in header template
- How to display all functions (hooks, filters, or custom php) used on a page inline
- shortcode – multiple instances of same parameter name in one shortcode instance
- Is there a counter for comments left?
- External wpdb connections in different plugins on single page
- How to add update function to plugin without adding it to https://wordpress.org/plugins/ [closed]
- 500 error when updating plugin option
- How to edit link for comment count
- Personalized Author Area
- New Variable Woocommerce product not showing variations, price, or add to cart on front end [closed]
- WP-ecommerce : Change the price before inserting it into the cart
- Integrating Custom Database with WordPress
- How do I duplicate a single wpmu site?
- Dynamic landing page – am I doing this right?
- How to add height and width to images on a page(using WP Bakery) to improve Google’s CLS score?
- how to display a template.php in a shortcode
- How to hide a woocommerce setting tab from admin & shop manager?
- Woocommerce add products to cart
- How to get data from a form on a wordpress site?
- I need to register and resize images, safe to delete plugin afterwards?
- Using mu-plugins on the Genesis Framework
- Is it possible to custom set query for a WordPress REST API response?
- wpdb update method is updating but not refreshing the current page data
- How can I upload and password protect Javadocs in WordPress?
- How to send custom mail when a user complete a specific form
- How to echo meta_key in easy digital downloads receipt (Purchase Confirmation page)
- Generating shortcode and HTML on button click
- Plugin error “array_key_exists(): The first argument should be either a string or an integer” [closed]
- Show content from plugin on index
- Sub Categories in drop down menu
- Migrating custom php we wrote from functions.php into a site-specific plugin
- “Listen” button on my main post page
- CMB2 Post Search Field displays/repeats initial post if left empty
- User content database [closed]
- Add HTML between feed items
- Private “Parents” content for school site
- Automatization for automatization
- Form submit from wordpress plugin
- Can a developer adopt a plugin marked as “not updated in over 2 years”?
- disable lightbox in a plugin [closed]
- How to include css for plugin setting page? [duplicate]
- Encode URL picked up by Digg Digg
- Allow a role to edit one specific plugin
- Post curl function save twice using plugin hook function wordpress
- Frontpage Admin Bar Disappeared
- WP Customer Reviews call short code on another page [closed]
- Need help saving input fields for Security Deposit plugin in WC Vendors page
- Getting warning of Missing argument 2 for wpdb::prepare()
- wordpress plugin noob situation
- turn off WooCommerce for a site in a multi site environment
- Count div with class (.length) only shows 0 [closed]
- WordPress plugin not automatic update
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- Any plugin installation and update overwrite current theme