WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use WordPress Multisite. I have multiple sites with plugins installed. I can successfully get a list of the plugin paths with the option value active_plugins from each site.

I can not get additional data from get_plugin data.

I use this code:

$plugins = get_blog_option($blog_id, 'active_plugins');
foreach( $plugins as $plugin )
    var_dump( get_plugin_data($plugin) );

The error message:

"Warning: fopen(akismet/akismet.php) [function.fopen]: failed to open stream: No such file or directory in C:\wamp\www\blogs\multisite\wp-includes\functions.php on line 3493"

If this is not working on a multisite environment, is there a better way?

share|improve this question
up vote 3 down vote accepted

The problem is the value inside the var $plugin. The function get_plugin_data will use the completed path, like /var/www/wp/wp-content/plugins/akismet/akismet.php.

Add the path before your plugin-folder and it works. I think you can use the constant WP_PLUGIN_DIR.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.