# Plugin Basics

# Getting Started

In this guide, we follow WordPress's Plugin Handbook / Plugin Basics (opens new window) steps to create the plugin structure.

The source code of the plugin can be found in this repository: https://github.com/PHP-Prefixer/hello-wp-world (opens new window)

# The Composer Schema of the WordPress Plugin

In this version of the Hello Dolly plugin, the plugin shows the date and hour before the lyrics. To do this, the plugin calls on the Carbon (opens new window) library, a dependency of the Laravel illuminate/support (opens new window) library.

The plugin has the following composer.json to declare the project, the illuminate/support library, and the prefixer service configuration:

    "name": "php-prefixer/hello-prefixed-world-for-wp",
    "description": "Hello Prefixed World plugin for WordPress. A plugin to showcase the PHP-Prefixer service. Install any library freely. PHP-Prefixer will manage your namespaces.",
    "require": {
        "illuminate/support": "^8.10"
    "extra": {
        "php-prefixer": {
            "project-name": "Hello Prefixed World for WordPress",
            "namespaces-prefix":: "PPP",
            "global-scope-prefix": "PPP_",

            "exclude-paths": [

In particular, this schema has the attribute excludePaths to help package the plugin for distribution. The excludePaths remove folders that should not be included in the target prefixed plugin (commands, unit tests, library documentation, etc.).

The prefixed project ZIP file will be installed on WordPress once it is processed and available for download.