Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

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

3 Answers 3

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 ...
share|improve this answer

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.

share|improve this answer
2  
The file name doesn’t matter at all. –  toscho Feb 27 at 10:35
    
Sure the file name doesn,t matter however the Plugin name in header must be unique. –  Preetom Banerjee Feb 27 at 14:40

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.

share|improve this answer

Your Answer

 
discard

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.