0

I have a plugin for Thesis that fixes issues with Wish List Member. The plug is called thesis-wlm. It only has a box.php file. I uploaded thesis-wlm.zip as a plugin and Wordpress attempted to install it but failed.

I then added the thesis-wlm folder, which contains the box.php file, to the plugins folder but nothing shows up in the plugins section.

There is a plugin header that follows this format:

Name: 
Author: 
Description: 
Version: 
Class: 
License:

Is there some other way to activate this plugin?

  • does your plugin file have a valid Plugin Header? – Milo Oct 12 '13 at 19:13
  • It does have one although it isn't the same as the one in the link. – 4thSpace Oct 12 '13 at 20:57
5

Your plugin isn't visible because you haven't provided a Plugin Name in your header. Change Name to Plugin Name and it'll show up. You're also missing a few lines in your header, if that's a concern to you. It's best to just follow the example provided in the codex:

<?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
 * License: A "Slug" license name e.g. GPL2
 */
|improve this answer|||||
  • The plugin did show up after that. But once I tried to activate it, I just get white pages everywhere, including the production site. Guess it was a bad idea after all. – 4thSpace Oct 12 '13 at 21:40
  • enable debugging so you can see the errors it is producing. – Milo Oct 12 '13 at 21:44
1

How to install plugin only from PHP file?

I am admittedly guessing a little about what you are trying to accomplish. The question is not as clear as it could be, but...

Create a directory called mu-plugins in wp-content so that you have /path/to/site/wp-content/mu-plugins/ and put your box.php in that directory. Any PHP pile in that directory is automatically loaded. Plugins like that are called "Must Use" plugins. You do not activate them through the normal means and you cannot deactivate them from the backend control panels.

If that isn't it you will need to post more of your plugin code, though I would bet on @Milo and the plugin header at this point.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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