To have your plugin listed in the ClassicPress Directory, you must first register, for which you will need to provide a GitHub Username (or a GitHub Org Name). You will then need to activate Two Factor Authentication, after which we will review your registration. You will receive an email when it has been approved.
You may then use the Software Submission Form to submit your plugin to the Directory. You will need to ensure that the code for your plugin is stored in a GitHub repository associated with the GitHub Username (or GitHub Org Name) you previously supplied when you registered.
You will also need to ensure that your plugin provides the following three required items:
Required Headers
Requires PHP
header – the minimum supported PHP versionRequires CP
header – the minimum supported ClassicPress version without the patch number included since it doesn’t affect compatibility in SemVer. For example:- Correct: 1.5
- Incorrect: 1.5.0
Premium URI
header – required for any plugins that sell a “Premium” version or upgrade. It must be a complete URI, starting withhttps://
to the sales page.Description
header – the description of the plugin. This header is unnecessary if using aREADME.md
file.
The headers should be listed (one line for each header) at the top of the main .php
file like this:
/**
* Plugin Name: Name of your plugin
* ...
* Requires PHP: 7.2
* Requires CP: 1.4
* Premium URI: https://website.com/premium-plugin/
* Description: (this header is unnecessary if using a README.md file)
*/
You may include other headers, but the ClassicPress Directory will ignore them.
As indicated by the ellipses (3 dots), you should typically include other headers too, though their presence serves different purposes and, as mentioned before, will be ignored by the ClassicPress Directory.
We can also read the headers and description if supplied in the plugin’s readme.txt
file, but this will work only if it includes the Requires CP
header.
It may also lead to a less pleasing formatting of the description of your plugin in the ClassicPress Directory. So relying on this method is not recommended.
Folder/File Structure
Plugins require a specific folder/file structure to work correctly in ClassicPress. This will look familiar if you know WordPress plugin file structures.
For plugins to function correctly, the root directory name must be the name of your main file containing the required headers. For example, if your directory name is plugin-name
then the main file must be plugin-name.php
.
You must ensure your zip file expands into the correct directory, which doesn’t contain the version numbers. The wrong directory name will cause validation issues when submitting your plugin to be listed in the directory—for example, plugin-name.zip
:
- Correct:
/plugin-name
- Incorrect:
/plugin-name-1.2.0
An example file structure for your plugin can be:
/plugin-name /plugin-name.php /uninstall.php /README.md /license.txt /languages /vendor /includes /assets /js /css
Releases
To manage versioning of your plugins correctly and automatically, you must use GitHub’s Releases to release each version. This ensures you can get the correct download URL (see below). ClassicPress specific release instructions can be found here.
Download URL Format
The ClassicPress Directory will only accept the following format of the download URL:
https://github.com/username/plugin-name/releases/download/v4.0.0/plugin-name-4.0.0.zip
This means you must upload your plugin’s zip file as an asset when publishing a release on GitHub. Auto-generated assets will have a different download URL and are not accepted.
The download URL from the WordPress.org repository will not be accepted.
Need help? Start a discussion in the forum, and we’ll be happy to help.