WordPress plugin metadata is a special block of comment lines placed at the top of a WordPress plugin file. This metadata provides WordPress with essential information about the plugin, such as its name, description, author, version, and other details. WordPress reads this metadata to display information about the plugin in the WordPress admin dashboard.
Common Fields in WordPress Plugin Metadata
Plugin Name
The display name of the plugin.
Plugin URI
A URL pointing to the plugin’s homepage or documentation.
Description
A short description of the plugin’s functionality.
Version
The current version of the plugin.
Author
The name of the plugin’s author.
Author URI
A URL to the author’s website or profile.
License
The license under which the plugin is distributed (e.g., GPLv2 or later).
License URI
A URL to the full text of the license.
Text Domain
Used for internationalization and localization of the plugin. It helps WordPress identify text strings for translation.
Domain Path
Specifies the folder where translation files are stored.
Purpose of Plugin Metadata
- Display in Admin Dashboard: WordPress uses this metadata to list and describe the plugin on the “Plugins” page in the admin area.
- Identify and Load the Plugin: Metadata tells WordPress what the plugin does and how to handle it.
- Documentation for Users: Helps users understand the plugin’s purpose and details.
- Localization: Metadata like
Text Domain
andDomain Path
supports multi-language compatibility.
Plugin Metadata Generator
Below is a WordPress plugin metadata generator where you can enter your plugin’s details such as the plugin name, URI, description, author, and other metadata fields. Once you click the “Generate Metadata” button, it will generate a block, which you can copy and paste into your main WordPress plugin file.