Is there a way to programmatically enable a plugin?
Yes, there’s activate_plugin() defined in wp-admin/includes/plugin.php (which isn’t normally loaded from non-admin code, and note that obviously a PHP plugin file can’t activate itself) wp-cli wp plugin activate if you meant activate from the command line without using the admin site (and at a pinch you could edit the active_plugins value in wp_options in the … Read more