所有插件都已取消激活,无法在WordPress中安装插件

When I login into wp-login (WordPress 3.6.1), I found that all my Plugins are deactivated.

Error message after wp-login:

The plugin user-locker/user-locker.php has been deactivated due to an error: The plugin does not have a valid header.

Then I try to install any Plugin, but failed.

Error message when install Plugin:

Downloading install package from http://downloads.wordpress.org/plugin/user-locker.1.2.zip… Download failed. Could not open handle for fopen() to /tmp/user-locker.tmp

But I check my website still running normal, not blank.

Kindly need assist to solve this issue.

Thanks.

Log in to /wp-admin and navigate to Plugins » Installed Plugins, and click the Edit link under one of the affected plugins. You should see a header like this (with proper text instead of hash symbols, obviously):

<?php
/*
Plugin Name: ######################
Plugin URI: http://#################.###/##########
Description: ######################
Version: 1.0
Author: ######################
Author URI: http://###################.###/
License: (c) ############# 2013.
*/

If you see anything else, then you have a problem. I suspect your site may have been infected by some sort of worm that has injected PHP code into the start of every file it could find.

Finally I solved it by myself.

  1. Login cPANEL > File Manager > Web Root (public_html/www) > click Go.
  2. Click 'New File' on the toolbar.
  3. Create new file php.ini.
  4. Open the new php.ini file with Notepad and fill with allow_url_fopen = 1;
  5. To make this php.ini file readable by subdirectory, open the file .htaccess file from public_html folder and add these on the last row <IfModule mod_suphp.c> suPHP_ConfigPath /home/USERNAME/public_html </IfModule>
  6. Change USERNAME with your hosting username.
  7. Done, your Plugins back to normal.

Good luck!

I encountered this same problem today. I noticed what I believe to be malware has been added to the top of all my php files.

To fix your plugins

  1. Log into your FTP find your plugins folder and download all plugins to your local plugin directory
  2. In each plugin open all php files and delete the malware that has been added to the top of the file.
  3. Save the file and overwrite it on the server.
  4. Go to plugins in your dashboard of wordpress and press activate.

This fixed all my plugins. They are appearing back in the plugins section of my dashboard, and just need to be reactivated.

I can only hope this isn't going to be a reoccurring problem.