Getting Started

Deployment Deployment - Diagnose Migrations Staging

Site Management

Backups Client Reporting Passwords Plugin Automation Plugin Management - Global Plugins & Themes - Diagnose Plugins & Themes - General Plugins & Themes - Git Plugins & Themes - Logs Must Install White Label WordPress Updates

Caching & Performance

Caching Caching - Blogs/Articles Caching - Diagnose Caching - Git Caching - WooCommerce Redis Optimize & Scale

Security

Security Security - Firewall

SMTP, CDN & DNS

SMTP SendGrid CDN CDN - AWS CDN - Cloudflare CDN - Diagnose Domains & DNS

Server & Tools

Analytics & Logs CRON Jobs Database Debug Tool Git Monitoring PHP Settings Redirects SEO Tools Server Errors sFTP SSL

Staq Billing

Staq Billing > Account Staq Billing > Client Staq Billing > Setup

Media

Media Media - Diagnose Media - Optimize

Accounts & Billing

Accounts & Billing

General

WordPress Hosting Website Diagnose Troubleshoot - Other

Failed to Parse the Package Metadata: How to Fix


On this page

    Typically, if you see “Failed to Parse the Package Metadata“, this is because you’ve probably created your own custom plugin or Theme and you’ve tried uploading it via:

    • Staq Panel of the site > Plugins > Add Plugin;
    • Staq Panel of the site > Theme > Add Theme
    • Bitbucket/Github integration via Staq Panel

    The cause of the issue relates the header metadata of a WordPress plugin/theme. Properly configuring these headers is essential for WordPress to recognize and handle the plugin appropriately.

    Errors

    Theme error: The theme is missing the style

    Plugin error: The plugin is missing the style

    To rectify and fix this issue, see below.

    Correct plugin/theme header metadata

    The following are best practice steps based on the official WordPress documentation to ensure you have the correct plugin header metadata:

    1. Plugin Name: This is a mandatory field. Make sure your plugin has a unique name specified that will be displayed in the WordPress Admin’s Plugins list.
    2. Plugin URI: This should be a unique URL, ideally on your own website, representing the homepage of the plugin. Remember, a WordPress.org URL is not acceptable here.
    3. Description: Keep a concise description (under 140 characters) for the plugin. This description is what appears in the Plugins section in the WordPress Admin.
    4. Version: Clearly mention the current version number of your plugin (e.g., 1.0 or 1.0.3).
    5. Requires at least: Specify the minimum WordPress version that your plugin supports.
    6. Requires PHP: State the minimum required PHP version for your plugin to operate.
    7. Author: List the name or names of the plugin’s authors. For multiple authors, separate their names with commas.
    8. Author URI: Provide a link to the author’s website or their profile on another platform, such as WordPress.org.
    9. License & License URI: Mention the short name of your plugin’s license (e.g., GPLv2). Also, provide a link to the full text of this license.
    10. Text Domain & Domain Path: If your plugin is to be translated or internationalized, it’s crucial to define the text domain and domain path correctly.
    11. Network: If your plugin can only be activated across a network, set this to true. If not needed, simply omit this field.
    12. Update URI: This is especially important to prevent third-party plugins from being accidentally overwritten during updates. Always specify a unique update URI for your plugin.

    Below is an example of a well-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: 5.2
     * Requires PHP:      7.2
     * 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
     * Update URI:        https://example.com/my-plugin/
     * Text Domain:       my-basics-plugin
     * Domain Path:       /languages
     */
    

    Always ensure that the header comment is placed at the top of your main plugin file. After making the necessary corrections to your plugin header, try activating the plugin again to see if the error is resolved.

    For more detailed information on WordPress plugin header requirements, visit the official WordPress documentation: WordPress Plugin Header Requirements.

    Need some help?

    We all do sometimes. Please reach out to our support team by dropping us a support ticket. We will respond fast.