Title: Activate plugin using external file
Last modified: November 30, 2017

---

# Activate plugin using external file

 *  [mnich209](https://wordpress.org/support/users/mnich209/)
 * (@mnich209)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/activate-plugin-using-external-file/)
 * Hi,
 * I want to activate Litespseed cache plugin – [https://pl.wordpress.org/plugins/litespeed-cache/](https://pl.wordpress.org/plugins/litespeed-cache/)–
   using external file. In codex i see function activate_plugin(). I included wp-
   admin/includes/plugins.php where the function is.
 * After that error display that function plugin_basename() is undefined, i included
   file with this function. After that error display another function etc.
 * Finally, after add 4 files to include the plugin has been activated but doesnt
   add rules to .htaccess (when you activate this plugin by wp-admin control panel
   he will add rules automaticly).
 * Do you know how to resolve this problem? In my opinion the best way is include
   all admin functions, but i don’t see any tutorial?
 * Regards, Michal

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/activate-plugin-using-external-file/#post-9737116)
 * Does it have to be an external file? If you’re just trying to activate plugins
   remotely, you might want to look into [WP-CLI](http://wp-cli.org).
 *  Thread Starter [mnich209](https://wordpress.org/support/users/mnich209/)
 * (@mnich209)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/activate-plugin-using-external-file/#post-9738375)
 * Hi,
 * No this rules are added to actual .htaccess file. Do you know any other solution
   than wp-cli ?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Activate plugin using external file’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [mnich209](https://wordpress.org/support/users/mnich209/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/activate-plugin-using-external-file/#post-9738375)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
