Created
October 13, 2016 15:33
-
-
Save goldhat/1cc7edc7c7af0cc894c7bc5c81ed53bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wordpress_path = "/path/to/my/wordpress/install"; | |
// may not be needed if inside WP and hooking into actions | |
// activate_plugin() is in plugin.php | |
require_once( $wordpress_path . "/wp-load.php" ); | |
require_once( $wordpress_path . "/wp-admin/includes/plugin.php"); | |
$plugins = array("cforms", "w3-total-cache", "wordpress-seo"); | |
foreach ($plugins as $plugin){ | |
$plugin_path = $wordpress_path."wp-content/plugins/{$plugin}.php"; | |
activate_plugin($plugin_path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment