I'm using a custom Php script to install WordPress via the Softaculous API. Once installed, what's the best way to programmatically install and activate a plugin? I could try setting up a custom WP script in Softaculous with a PHP script in a custom plugin in an mu-plugins folder, but I would prefer not to do that, and instead install/activate the plugin after the WP installation.
So what I would like to do after the WP main install and from an external PHP script if possible is:
- authenticate with admin credentials via PHP
- download a specific plugin from the repository
- install the plugin
- activate the plugin
Maybe I could use the
TGM-Plugin-Activation to install/activate another plugin, but I would need to be able to install/activate that plugin itself. Is this possible without any admin user clicks and without using the mu-plugins folder pre-install?
I've read these posts: