> Free generator of the main plugin file header with every field checked against the WordPress.org upload and Plugin Check rules.

Source: https://nitramix.com/tools/wordpress-plugin-header-generator

Free tool

# WordPress Plugin Header Generator Every field, checked.

Fill in the details and copy a correct header for your main plugin file. Each field is checked against the rules the WordPress.org upload and Plugin Check use, so a typo does not cost you a review round.

## Generate your plugin header

Where will the plugin live?

Slug and folder: gallery-boost

54/150

Default: gallery-boost

Slugs, e.g. woocommerce

gallery-boost/gallery-boost.php

```
<?php
/**
 * Plugin Name:        Gallery Boost
 * Description:        Add product videos to the WooCommerce product gallery.
 * Version:            1.0.0
 * Requires at least:  6.2
 * Requires PHP:       7.4
 * Author:             Your Name
 * Author URI:         https://example.com
 * License:            GPL v2 or later
 * License URI:        https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:        gallery-boost
 * Domain Path:        /languages
 * Requires Plugins:   woocommerce
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
```

### Ready for WordPress.org

-   Needs WordPress 6.5 or newer. Users must activate these plugins first.

[Matching readme.txt](https://nitramix.com/tools/wordpress-readme-generator#r=eyJmIjp7Im5hbWUiOiJHYWxsZXJ5IEJvb3N0IiwiY29udHJpYnV0b3JzIjoiIiwiZG9uYXRlTGluayI6IiIsInRhZ3MiOiIiLCJyZXF1aXJlcyI6IjYuMiIsInRlc3RlZCI6IiIsInJlcXVpcmVzUGhwIjoiNy40Iiwic3RhYmxlVGFnIjoiMS4wLjAiLCJsaWNlbnNlIjoiR1BMdjIgb3IgbGF0ZXIiLCJsaWNlbnNlVXJpIjoiaHR0cHM6Ly93d3cuZ251Lm9yZy9saWNlbnNlcy9ncGwtMi4wLmh0bWwiLCJzaG9ydERlc2NyaXB0aW9uIjoiQWRkIHByb2R1Y3QgdmlkZW9zIHRvIHRoZSBXb29Db21tZXJjZSBwcm9kdWN0IGdhbGxlcnkuIiwiZGVzY3JpcHRpb24iOiIiLCJpbnN0YWxsYXRpb24iOiIiLCJmYXEiOltdLCJzY3JlZW5zaG90cyI6W10sImNoYW5nZWxvZyI6W3sidmVyc2lvbiI6IjEuMC4wIiwibm90ZXMiOiJJbml0aWFsIHJlbGVhc2UuIn1dLCJ1cGdyYWRlTm90aWNlIjpbXX0sImsiOiIifQ) [Generate the full plugin](https://nitramix.com/tools/wordpress-plugin-boilerplate-generator#b=eyJuYW1lIjoiR2FsbGVyeSBCb29zdCIsImRlc2NyaXB0aW9uIjoiQWRkIHByb2R1Y3QgdmlkZW9zIHRvIHRoZSBXb29Db21tZXJjZSBwcm9kdWN0IGdhbGxlcnkuIiwidmVyc2lvbiI6IjEuMC4wIiwiYXV0aG9yIjoiWW91ciBOYW1lIiwiYXV0aG9yVXJpIjoiaHR0cHM6Ly9leGFtcGxlLmNvbSIsInBsdWdpblVyaSI6IiIsInJlcXVpcmVzQXRMZWFzdCI6IjYuMiIsInJlcXVpcmVzUGhwIjoiNy40IiwiaG9zdGluZyI6Indwb3JnIn0)

## What each header field does

WordPress parses these lines with get\_plugin\_data(). Order does not matter, the exact spelling of each label does.

### Plugin Name (required)

Shown on the Plugins screen. On first submission to WordPress.org it also becomes your permanent slug.

### Description

One sentence under the name on the Plugins screen. WordPress.org rejects uploads without it.

### Version

Numbers and dots only. Bump it with every release; WordPress compares it to offer updates.

### Requires at least / Requires PHP

WordPress stops installs on sites that are too old, so they never see a fatal error from your code.

### Author / Author URI / Plugin URI

Credit and links on the Plugins screen. Plugin URI and Author URI must be different, or the upload fails.

### License / License URI

GPLv2 or later compatible for WordPress.org. Use the same license in readme.txt.

### Text Domain / Domain Path

For translations. The text domain must equal the slug on WordPress.org. Domain Path points to your .mo files.

### Requires Plugins

Dependencies by slug (WordPress 6.5+). Users must activate them first.

### Update URI / Network

Update URI is for plugins updated from your own server. Network: true allows network activation only on multisite.

## Keep the header and readme.txt in sync

### In the PHP header

Plugin Name, Version, Requires at least, Requires PHP, Text Domain, Requires Plugins, Update URI. WordPress itself reads these.

### In readme.txt

Stable tag, Tested up to, Tags, Contributors and the description. WordPress.org reads these for your plugin page. Requires at least and Requires PHP can appear in both; keep them the same.

Plugin development

### Want it built and published for you?

We build WordPress plugins, get them through the WordPress.org review and keep them updated. Our own plugins there have 4,000+ active installs.

[Talk about your plugin](https://nitramix.com/services/wordpress-plugin-development)

Free calculator

### What would your plugin cost to build?

Pick the type, size and features and get a price range, a timeline and the yearly support cost in about a minute.

[Estimate my plugin](https://nitramix.com/tools/wordpress-plugin-development-cost-calculator)

## FAQ

### What is the WordPress plugin header?

A PHP comment block at the top of your main plugin file. WordPress reads it to list the plugin on the Plugins screen: the name, description, version, author and requirements. Only "Plugin Name" is required for WordPress to see the plugin, but WordPress.org also needs a description, a numeric version and a license.

### Which file should contain the plugin header?

The main PHP file in the root of your plugin folder, usually named after the slug, for example my-plugin/my-plugin.php. Only one file in the folder should have a header, or WordPress may list the plugin twice.

### Does the Text Domain have to match the slug?

For plugins on WordPress.org, yes. Translations from translate.wordpress.org are loaded by slug, and the Plugin Check tool reports a mismatch as an error. Use lowercase letters and hyphens, exactly like the plugin folder name.

### What does "Requires Plugins" do?

Added in WordPress 6.5, it lists other WordPress.org plugins (by slug, comma separated) that yours needs, for example "woocommerce". WordPress will not let users activate your plugin until those are active, and shows the dependency on the Plugins screen.

### Should I set Update URI?

Not for plugins hosted on WordPress.org: updates come from there and Plugin Check flags the header. For premium or private plugins, set it to your own update server address. Then WordPress will never offer an unrelated WordPress.org plugin with the same slug as an "update" for yours.

### Why does WordPress.org reject my version number?

The upload checker only accepts numbers and dots, like 1.0 or 2.3.1. Versions such as "1.0-beta", "v2" or "1.0 RC1" are refused. Keep beta versions out of the directory or number them 0.9, 0.9.1 and so on.

## More free tools

### WordPress Readme Generator & Validator

Write or check your plugin readme.txt with a live preview and an SEO score based on how WordPress.org search ranks plugins.

Open tool

[WordPress Readme Generator & Validator](https://nitramix.com/tools/wordpress-readme-generator)

### WordPress Plugin Search Rank Checker

See where your plugin ranks in WordPress.org search for any keyword, and why the top 10 rank above you.

Open tool

[WordPress Plugin Search Rank Checker](https://nitramix.com/tools/wordpress-plugin-search-rank-checker)

### WordPress Plugin Stats & Comparison

Downloads chart, active installs, ratings and support for any WordPress.org plugin, with a side by side comparison.

Open tool

[WordPress Plugin Stats & Comparison](https://nitramix.com/tools/wordpress-plugin-stats)

### WordPress Plugin Boilerplate Generator

Pick the parts you need and download a modern plugin starter that follows the WordPress Coding Standards.

Open tool

[WordPress Plugin Boilerplate Generator](https://nitramix.com/tools/wordpress-plugin-boilerplate-generator)

### WordPress Plugin Name Checker

Check a plugin name against the WordPress.org rules and see whether its slug is still free.

Open tool

[WordPress Plugin Name Checker](https://nitramix.com/tools/wordpress-plugin-name-checker)

### WordPress Plugin Banner & Icon Generator

Turn one image (or your plugin name) into the four banner and icon files WordPress.org needs, named right.

Open tool

[WordPress Plugin Banner & Icon Generator](https://nitramix.com/tools/wordpress-plugin-banner-icon-generator)

[All free tools](https://nitramix.com/tools)
