Deploy WordPress plugin and theme to the wordpress.org plugin directory.
npm install --save-dev wp-deployer
- slug : Plugin or theme slug; Default:
name
value inpackage.json
- username : WordPress repository username; This is required.
- repoType: Repo type;
plugin
ortheme
; Default:plugin
- buildDir: The directory where your theme or plugin exists as you want it on the repo. Default:
dist
- deployTrunk: Whether to deploy to trunk. This could be set to false to only commit the assets directory. Applies for
plugin
only; Default:true
- deployTag: Whether to deploy to trunk. This could be set to false to only commit the assets directory. Applies for
plugin
only; Default:true
- deployAssets: Whether to deploy assets. Applies for
plugin
only; Default:false
- assetsDir: The directory where your plugins assets are kept; Default:
.wordpress-org
- earlierVersion: Last released version. Applies for
theme
only; This is required ifrepoType
istheme
.
In package.json
:
...
"wpDeployer": {
"username": "yourusername",
"buildDir": "dist"
},
...
"scripts": {
...
"wpdeploy": "wp-deployer"
}
In package.json
:
...
"wpDeployer": {
"repoType": "theme", // This is required
"earlierVersion": "1.0.2", // Required; Keep last released version
"username": "yourusername",
"buildDir": "dist"
},
...
"scripts": {
...
"wpdeploy": "wp-deployer"
}