1

I have a question here and hope you guys can help me with that. Couldn't find the exact answer from search and I am not a coder myself. I was given the instruction (to change plugin name) by my previous coder before he handed the plugin to me. He said if I want to change the plugin name, all I need to to is go to popups.php and change the first line, which is Plugin Name: xxx.

So I extracted the folder, change the name and and zipped the whole folder again. When I tried to install it through wordpress, it says installation failed. Did I miss out any step here?

Here is the error message:

Unpacking the package…

Installing the plugin…

The package could not be installed. No valid plugins were found.

Plugin install failed.

4
  • 2
    You should upload the plugin as-is, and then edit that file through the Plugins > Editor admin menu
    – shea
    Jan 1, 2013 at 7:29
  • Also, can you post the content of the file here?
    – shea
    Jan 1, 2013 at 7:32
  • Also see: stackoverflow.com/q/10563782/1042798
    – shea
    Jan 1, 2013 at 7:36
  • Are you in a Mac? I've seen this happening when zipping with the system app...
    – brasofilo
    Jan 1, 2013 at 8:33

5 Answers 5

2

The top of your Plugin's main PHP file must contain a standard Plugin information header. This header lets WordPress recognize that your Plugin exists, add it to the Plugin management screen so it can be activated, load it, and run its functions; without the header, your Plugin will never be activated and will never run. Here is the header format:

<?php
/**
 * Plugin Name: Name Of The Plugin
 * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
 * Description: A brief description of the Plugin.
 * Version: The Plugin's Version Number, e.g.: 1.0
 * Author: Name Of The Plugin Author
 * Author URI: http://URI_Of_The_Plugin_Author

Also note the name of plugin i.e.(plugin_name.php) and Plugin name in header should match and be unique.

2
  • 2
    The file name doesn’t matter at all.
    – fuxia
    Feb 27, 2014 at 10:35
  • Sure the file name doesn,t matter however the Plugin name in header must be unique. Feb 27, 2014 at 14:40
1

This error comes when the plugin header is corrupt. Plugin Name: xxx should not be the first line on the file, instead the first few lines should look like this:

<?php
/*
Plugin Name: xxx

... more text here ...

*/

... plugin code here ...
1

If you downloaded it from CodeCanyon or similar, unzip the download package first, then upload the real plugin zip. Often there are licensing and documentation and source files included that are not part of the installable.

1

plugin header information file must be at the plugin root with valid header information like:

<?php
/**
 * Plugin Name: Name Of The Plugin
 * Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
 * Description: A brief description of the Plugin.
 * Version: The Plugin's Version Number, e.g.: 1.0
 * Author: Name Of The Plugin Author
 * Author URI: http://URI_Of_The_Plugin_Author

for best practice Folder Structure

-2

STEP 1:

COPY FOLDER TO YOUR WP PLUGINS DIRECTORY. AND SEE IF YOU CAN ACTIVATE.IF YES, 

STEP 2 :

RE-ZIP WITH FEW FACTS IN MIND, TRY TO ZIP MAIN FOLDER.WHERE MAIN FOLDER IS A FOLDER WHICH HAS GOT MAIN FILE AND OTHER STUFFS IN IT.

STEP 3: if plugin failed to activate in first step

RENAME FOLDER TO SINGLE WORD. LIKE rat_catcher instead rat catcher.
UNZIP OLD FOLDER AND CHECKOUT YOUR FILE STRUCTURE. U MIGHT HAVE MISPLACED MAIN FILE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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