Plugin Header Requirements

The main PHP file of a plugin is the one that contains certain header information which tells ClassicPress that it is a plugin, and provides information about the plugin. ClassicPress only supports plugin files in the base plugins directory (wp-content/plugins) and in one directory below the plugins directory (wp-content/plugins/my-plugin). The file it looks for has the plugin data and must be found in one of those two locations.

The plugin file and plugin folder should have the same name, although this is not a technical requirement.

There are only four fields which are technically required to be included in the plugin header:
The Plugin Name, Version, Requires PHP and Requires CP.
However there are several optional, but recommended fields. All plugin data must be on its own line. For plugin description, it must not have any newlines.

Header Fields

Plugin Name: The name of your plugin, which will be displayed in the ClassicPress Plugin Directory and in the site’s dashboard. It should be unique.
Plugin URI: The home page of the plugin, which should be a unique URL, preferably on your own website. This must be unique to your plugin. You cannot use a WordPress.org or ClassicPress.net URL here.
Description: A short description of the plugin, as displayed in the ClassicPress Plugins Directory and in the site’s dashboard. Keep this description to fewer than 140 characters.
This header is unnecessary if using a README.md file.
Version: The current version of the plugin (e.g. 1.0.3 or 2.1.1); for ClassicPress plugins the version should follow semantic versioning.
Requires at least: The lowest WordPress version that the plugin will work on.
This field only works if the plugin is stored on the WordPress Repository.
If set, the version should be no higher than 4.9.
Requires PHP: The minimum required PHP version.
Requires CP: The lowest ClassicPress version that the plugin will work on.
This field only works if the plugin is stored on the ClassicPress Plugin Directory.
If set, plugin updates from WordPress are disabled, in favour of updates from the ClassicPress Directory Integration plugin (if installed).
Author: The name of the plugin author. Multiple authors may be listed using commas.
Author URI: The author’s website or profile on another website, such as WordPress.org or ClassicPress Forum Profile.
License: The short name (slug) of the plugin’s license (e.g. GPLv2). All plugins submitted to the ClassicPress Plugin Directory must be licensed under a GPL license or have a GPL compatible license.
License URI: A link to the full text of the license, such as http://www.gnu.org/licenses/gpl-2.0.html.
Text Domain: The gettext text domain of the plugin. This should be unique per plugin and should be same as the one used in load_plugin_textdomain().
Domain Path: The folder location of the translations; this is only useful if the translations are in a folder above the plugin’s base path. For example, if .mo files are located in the languages folder then Domain Path will be /languages and must have the first slash.
Network: Whether the plugin can only be activated network-wide. Can only be set to true, and should be left out when not needed.

This is an example of a properly formatted Plugin Header:

/**
 * Plugin Name:       My Basics Plugin
 * Plugin URI:        https://example.com/plugins/the-basics/
 * Description:       Handle the basics with this plugin.
 * Version:           1.10.3
 * Requires at least: 4.9.15
 * Requires PHP:      7.2
 * Requires CP:       1.3
 * Author:            John Smith
 * Author URI:        https://author.example.com/
 * License:           GPL v2 or later
 * License URI:       https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:       my-basics-plugin
 * Domain Path:       /languages
 */

Last updated on June 28th, 2025 at 11:34 am