Directory Requirements

To have your software 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 software (whether plugin or theme) to the Directory. You will need to ensure that the code for your software 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 software provides the following three required items:

Required Headers

  1. Requires PHP header – the minimum supported PHP version
  2. Requires 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
  3. Premium URI header – required for any plugins/themes that sell a “Premium” version or upgrade. It must be a complete URI, starting with https:// to the sales page.
  4. README.md file – it must be included in the zip file.
    1. If it’s not present, the Directory will look for the Description header.
    2. The Directory will look for the file in your repository as a fallback.

Plugins

For a plugin, the headers should be listed (one line for each header) at the top of the main .php file like this:

/**
* 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. (For plugins only, 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.)

Themes

For a theme, the headers should be listed (again, one line for each header) at the top of the style.css file, like this:

/*
Theme Name: Name of your theme
...
Description: A description of your theme.
Requires PHP: 7.2
Requires CP: 1.4
Premium URI: https://website.com/premium-theme/
...
*/

As indicated by the ellipses (3 dots), you should typically include other headers, too, though their presence serves different purposes and will be ignored by the ClassicPress Directory.

If the required headers are not present in the style.css file, the Directory will attempt to obtain them from the theme’s readme.txt file, but, as with plugins, this will work only if that file includes the Requires CP header. Even then, this fallback may lead to less pleasing formatting of the description of your theme in the ClassicPress Directory. Relying on this fallback is, therefore, not recommended.

Folder/File Structure

Plugins and themes require a specific folder/file structure to work correctly in ClassicPress. This will look familiar if you know WordPress plugin/theme file structures:

Plugins

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

Themes

Themes have a slightly different file structure compared to plugins. They require two files, while all other files are optional:

  • index.php
  • style.css

In your theme, your required headers go in the style.css. It must be placed in the root directory of your theme, not the /assets or /css directory your theme may have.

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 theme to be listed in the directory—for example, theme-name.zip:

  • Correct: /theme-name
  • Incorrect: /theme-name-1.2.0

Releases

To manage versioning of your plugins and themes correctly and automatically, you must use GitHub’s Releases to release each version. This ensures you can get the correct download URL (see below).

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 or theme’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.