1) Directory Structure
I’m using my-plugins directory on Desktop and it looks like
2) Symlink to project
When I need to work on my plugins, just symlink to current WordPress’ plugins directory.
[UPDATE 2019] Symlink was a bad idea, I don’t touch those repositories until I’m ready to publish the update. When development is done, just switch the git repo then git pull && plugin-deploy && plugin-tag 1.4.5 whatever
3) Deploy like a Boss
After works done, just run “plugin-deploy” command. I’ve added “plugin-deploy” as an alias, you can add them to export path as well.
</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>alias plugin-deploy='sh /Users/mustafauysal/scripts/plugin-deploy.sh'</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>alias plugin-tag='sh /Users/mustafauysal/scripts/plugin-tag.sh'</p> <!-- /wp:paragraph --> <!-- wp:paragraph --> <p>
1) Use WP-CLI to generate plugins
You can use wp scaffold plugin foo-bar to generate “foo-bar” plugin, these scripts will respect .distignore file (Your plugins will be clean on WordPress.org)
2) Don’t tag plugins which contain too many objects
Yeah, I did that mistake for my https://github.com/mustafauysal/compressed-emoji plugin and..