SlideShare a Scribd company logo
How to publish
a plugin at WordPress.org
Workshop
Otto Kekäläinen
@ottokekalainen
WordCamp Finland
Tampere 9.5.2015
Yes,you came to the right place!
Step 0: Optional preparations for
those with high ambitions
Look at the source code of new plugins by respected
authors.Is there something in the code structure,
use of classes and namespaces and internal API that
you want to model in your plugin?
Read the Pear (PHP) and WordPress code style
guides to make sure your code looks professional.
Scan your code with PHP CodeSniffer for extra
scrutiny.
Step 2: Add readme.txt
and license
Every plugin published at WordPress.org must have a
readme.txt file.Get
https://wordpress.org/plugins/about/readme.txt and
modify.Verify correctness with at
https://wordpress.org/plugins/about/validator/
All plugins at WordPress.org must be licensed with GPLv2 or
later or a license compatible with that.Personally I
recommend GPLv3.
 Include https://www.gnu.org/licenses/gpl-3.0.txt ,with filename LICENSE
 Read recommendations about source code license headers in every file
Check that file headers
match readme.txt
<?php
/**
* Plugin Name: WooCommerce MWS sync
* Plugin URI: https://github.com/Seravo/woocommerce-mws
* Description: This plugin syncs product inventories between Woocommerce and Amazon
* Version: 1.0
* Author: Seravo Oy
* Author URI: http://seravo.fi
* License: GPLv3
*/
/**
* Copyright 2015 Seravo Oy
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License,version 3,as
* published by the Free Software Foundation.
Step 3: Publish at Github
WordPress.org uses Subversion (svn) due to
historical reasons.To maximize your chances of
getting pull requests,publish and develop your
plugin at Github.
Later releases will be done by exporting the plugin
from git to svn.
Step 4: Submit at WordPress.org
Read the guidelines to be sure you are doing the
correct things
https://wordpress.org/plugins/about/guidelines/
Create and account at WordPress.org and then
submit the plugin at
https://wordpress.org/plugins/add/
Step 5: Review
Wait for feedback from the reviewers.Can take
from days to weeks.
Fix all issues until passes review.
The email you are waiting for!
[WordPress.org Plugins] Request Approved: woocommerce-mws-sync
Your plugin hosting request has been approved.
Within one hour,you will have access to your SVN repository at
http://plugins.svn.wordpress.org/woocommerce-mws-sync/
with your WordPress.org username and password (the same one you use on the forums).
Here's some handy links to help you get started.
Using Subversion with the WordPress Plugins Directory
https://wordpress.org/plugins/about/svn/
Enjoy!
Step 6: Use WordPress.org SVN
Once accepted,you get access to the SVN
repository where WordPress.org hosts your plugin.
Add your plugin to the SVN directory trunk/
Add banner and icons to the SVN directory assets/
 banner-772x250.jpg
 icon-128x128.png
 icon-256x256.png
Step 7: Enjoy!
Please tweet to @ottokekalainen
with a link to your plugin
if you published
with the help of this presentation!
Step 8: Upgrade
You can release upgrades by committing to SVN
new versions where the readme.txt has been
modified to have a bigger version number.
For version numbers please follow the principles
stated at semver.org.
Tools for git to svn syncing will do the repetitive
things for you
 https://github.com/Seravo/git-to-wordpress-plugin-svn-pusher
Coding standards
The coding standards of WordPress and PHP/PEAR:
https://make.wordpress.org/core/handbook/coding-standards/php/
http://pear.php.net/manual/en/standards.php
You can automatically check if the code follows coding standards using PHP Code
Sniffer:
sudo apt-get install php5-cli php-pear
sudo pear install PHP_CodeSniffer
php -l example.php # Check for syntax errors
phpcs example.php # Check for coding style (defaults to PEAR standards)
PHP CodeSniffer with WordPress standards
Installation example on Ubuntu
sudo -s
cd /usr/share/php/PHP/CodeSniffer
git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
wpcs
cd Standards
ln -s ../wpcs/WordPress* .
exit
phpcs -i
The installed coding standards are Squiz, PHPCS, PEAR, PSR2, WordPress-VIP, PSR1, WordPress-Core,
MySource, WordPress, Zend and WordPress-Extra
phpcs --standard=WordPress *.php
--------------------------------------------------------------------------------
FOUND 587 ERRORS AND 16 WARNINGS AFFECTING 238 LINES
--------------------------------------------------------------------------------
36 | ERROR | [x] Tabs must be used to indent lines; spaces are not allowed
36 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs, found 0
37 | ERROR | [x] Tabs must be used to indent lines; spaces are not allowed
37 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found 0
37 | ERROR | [x] Expected 1 spaces after opening bracket; 0 found
37 | ERROR | [x] Expected 1 spaces before closing bracket; 0 found
Example of a .git/hooks/pre-commit for PHP developers
https://gist.github.com/ottok/ee1384d8229e83b6486e
#!/bin/bash
for FILE in $(git diff --cached --name-only); do
if [[ "$FILE" =~ .php$ ]]; then
php -l "$FILE" 1> /dev/null
if [[ $? -ne 0 ]]; then
echo -e "e[1;33mAborting commit: PHP code contains syntax errorse[0m" >&2
exit 1
f
f
done
for FILE in $(git diff --cached --name-only); do
if [[ "$FILE" =~ .php$ ]]; then
phpcs -n "$FILE"
if [ $? -ne 0 ]; then
echo -e "e[1;33mAborting commit: PHP code violates coding standardse[0m" >&2
exit 1
f
f
done
Example of a .git/hooks/pre-commit for PHP developers -sceenshot
Pro WordPress development environment
In bigger projects it will be useful to have a proper development environment setup,
that includes PHP CodeSniffer,xdebug etc tools pre-installed in a Vargant image:
https://github.com/seravo/wordpress
Contact Seravo if you need experts in
WordPress or other open source software
Open seravo.f
See our blog for in-depth tips

More Related Content

What's hot

Secure your Cpanel in 9 advanced tips
Secure your Cpanel in 9 advanced tipsSecure your Cpanel in 9 advanced tips
Secure your Cpanel in 9 advanced tips
Tera Mny
 
Installing and configuring a dhcp on windows server 2016 step by step
Installing and configuring a dhcp on windows server 2016 step by stepInstalling and configuring a dhcp on windows server 2016 step by step
Installing and configuring a dhcp on windows server 2016 step by step
Ahmed Abdelwahed
 
Install active directory on windows server 2016 step by step
Install active directory on windows server 2016  step by stepInstall active directory on windows server 2016  step by step
Install active directory on windows server 2016 step by step
Ahmed Abdelwahed
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
dotCloud
 
Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0
Micah Wood
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginMainak Goswami
 
Web Platform Installer Announcement
Web Platform Installer AnnouncementWeb Platform Installer Announcement
Web Platform Installer Announcement
Lauren Cooney
 
Php psr standard 2014 01-22
Php psr standard 2014 01-22Php psr standard 2014 01-22
Php psr standard 2014 01-22Võ Duy Tuấn
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB Plugin
Pandora FMS
 
Wordcamp2012 build your plugin
Wordcamp2012 build your pluginWordcamp2012 build your plugin
Wordcamp2012 build your plugin
Alexandre Marreiros
 
Why you should be using Aegir: The Drupal-oriented hosting system
Why you should be using Aegir: The Drupal-oriented hosting systemWhy you should be using Aegir: The Drupal-oriented hosting system
Why you should be using Aegir: The Drupal-oriented hosting system
Seth Viebrock
 
WordPress Plugin Development For Beginners
WordPress Plugin Development For BeginnersWordPress Plugin Development For Beginners
WordPress Plugin Development For Beginners
johnpbloch
 
Readme
ReadmeReadme
Readme
y1ash
 
Apache ssl
Apache ssl Apache ssl
Apache ssl
Mít Tơ Róm
 
Create your own composer package
Create your own composer packageCreate your own composer package
Create your own composer package
Lattapon Yodsuwan
 
Aegir presentation
Aegir presentationAegir presentation
Aegir presentation
Mindtrades
 
harjotverma_assign3
harjotverma_assign3harjotverma_assign3
harjotverma_assign3Harjot Verma
 

What's hot (20)

Secure your Cpanel in 9 advanced tips
Secure your Cpanel in 9 advanced tipsSecure your Cpanel in 9 advanced tips
Secure your Cpanel in 9 advanced tips
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Installing and configuring a dhcp on windows server 2016 step by step
Installing and configuring a dhcp on windows server 2016 step by stepInstalling and configuring a dhcp on windows server 2016 step by step
Installing and configuring a dhcp on windows server 2016 step by step
 
Install active directory on windows server 2016 step by step
Install active directory on windows server 2016  step by stepInstall active directory on windows server 2016  step by step
Install active directory on windows server 2016 step by step
 
Installing and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command lineInstalling and running Postfix within a docker container from the command line
Installing and running Postfix within a docker container from the command line
 
Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0Using Composer with WordPress - 2.0
Using Composer with WordPress - 2.0
 
Step by step guide for creating wordpress plugin
Step by step guide for creating wordpress pluginStep by step guide for creating wordpress plugin
Step by step guide for creating wordpress plugin
 
Web Platform Installer Announcement
Web Platform Installer AnnouncementWeb Platform Installer Announcement
Web Platform Installer Announcement
 
Php psr standard 2014 01-22
Php psr standard 2014 01-22Php psr standard 2014 01-22
Php psr standard 2014 01-22
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB Plugin
 
Wordcamp2012 build your plugin
Wordcamp2012 build your pluginWordcamp2012 build your plugin
Wordcamp2012 build your plugin
 
Why you should be using Aegir: The Drupal-oriented hosting system
Why you should be using Aegir: The Drupal-oriented hosting systemWhy you should be using Aegir: The Drupal-oriented hosting system
Why you should be using Aegir: The Drupal-oriented hosting system
 
WordPress Plugin Development For Beginners
WordPress Plugin Development For BeginnersWordPress Plugin Development For Beginners
WordPress Plugin Development For Beginners
 
Readme
ReadmeReadme
Readme
 
Apache ssl
Apache ssl Apache ssl
Apache ssl
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
Create your own composer package
Create your own composer packageCreate your own composer package
Create your own composer package
 
Appache.ppt
Appache.pptAppache.ppt
Appache.ppt
 
Aegir presentation
Aegir presentationAegir presentation
Aegir presentation
 
harjotverma_assign3
harjotverma_assign3harjotverma_assign3
harjotverma_assign3
 

Similar to How to publish your plugin as open source and contribute to WordPress

5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
William Chong
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin Development
Aizat Faiz
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
Brendan Sera-Shriar
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
Steve Mortiboy
 
Securing Word Press Blog
Securing Word Press BlogSecuring Word Press Blog
Securing Word Press Blog
Chetan Gole
 
Basics for Securing WordPress
Basics for Securing WordPressBasics for Securing WordPress
Basics for Securing WordPress
miss604
 
Plugins debugging and developing
Plugins debugging and developingPlugins debugging and developing
Plugins debugging and developingbriancolinger
 
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Vlad Lasky
 
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
rtCamp
 
5 Steps to Develop a WordPress Plugin From Scratch.pdf
5 Steps to Develop a WordPress Plugin From Scratch.pdf5 Steps to Develop a WordPress Plugin From Scratch.pdf
5 Steps to Develop a WordPress Plugin From Scratch.pdf
BeePlugin
 
Writing a Wordpress plugin from scratch
Writing a Wordpress plugin from scratchWriting a Wordpress plugin from scratch
Writing a Wordpress plugin from scratch
Kostas Karolemeas
 
Code Igniter Code Sniffer
Code Igniter  Code SnifferCode Igniter  Code Sniffer
Code Igniter Code Sniffer
Albert Rosa
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
Brad Williams
 
WordCamp 2015
WordCamp 2015WordCamp 2015
WordCamp 2015
Luiza Libardi
 
Wordpress #2 : customisation
Wordpress #2 : customisationWordpress #2 : customisation
Wordpress #2 : customisation
Jean Michel
 
Wordpress development: A Modern Approach
Wordpress development:  A Modern ApproachWordpress development:  A Modern Approach
Wordpress development: A Modern Approach
Alessandro Fiore
 
WordPress MU 101
WordPress MU 101WordPress MU 101
WordPress MU 101
Pete Mall
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010
Brad Williams
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
Brad Williams
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore
 

Similar to How to publish your plugin as open source and contribute to WordPress (20)

5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin Development
 
Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008Making the Most of Plug-ins - WordCamp Toronto 2008
Making the Most of Plug-ins - WordCamp Toronto 2008
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Securing Word Press Blog
Securing Word Press BlogSecuring Word Press Blog
Securing Word Press Blog
 
Basics for Securing WordPress
Basics for Securing WordPressBasics for Securing WordPress
Basics for Securing WordPress
 
Plugins debugging and developing
Plugins debugging and developingPlugins debugging and developing
Plugins debugging and developing
 
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
Tips for Fixing a Hacked WordPress Site - WordCamp Sydney 2016
 
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
Managing a WordPress Site as a Composer Project by Rahul Bansal @ WordCamp Na...
 
5 Steps to Develop a WordPress Plugin From Scratch.pdf
5 Steps to Develop a WordPress Plugin From Scratch.pdf5 Steps to Develop a WordPress Plugin From Scratch.pdf
5 Steps to Develop a WordPress Plugin From Scratch.pdf
 
Writing a Wordpress plugin from scratch
Writing a Wordpress plugin from scratchWriting a Wordpress plugin from scratch
Writing a Wordpress plugin from scratch
 
Code Igniter Code Sniffer
Code Igniter  Code SnifferCode Igniter  Code Sniffer
Code Igniter Code Sniffer
 
WordPress Security
WordPress SecurityWordPress Security
WordPress Security
 
WordCamp 2015
WordCamp 2015WordCamp 2015
WordCamp 2015
 
Wordpress #2 : customisation
Wordpress #2 : customisationWordpress #2 : customisation
Wordpress #2 : customisation
 
Wordpress development: A Modern Approach
Wordpress development:  A Modern ApproachWordpress development:  A Modern Approach
Wordpress development: A Modern Approach
 
WordPress MU 101
WordPress MU 101WordPress MU 101
WordPress MU 101
 
Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010Now That's What I Call WordPress Security 2010
Now That's What I Call WordPress Security 2010
 
Creating Your First WordPress Plugin
Creating Your First WordPress PluginCreating Your First WordPress Plugin
Creating Your First WordPress Plugin
 
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress ThemesPhilip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
Philip Arthur Moore: Best Practices — On Breaking and Fixing WordPress Themes
 

More from Otto Kekäläinen

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
Otto Kekäläinen
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
Otto Kekäläinen
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
Otto Kekäläinen
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
Otto Kekäläinen
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
Otto Kekäläinen
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
Otto Kekäläinen
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
Otto Kekäläinen
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
Otto Kekäläinen
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
Otto Kekäläinen
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
Otto Kekäläinen
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
Otto Kekäläinen
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
Otto Kekäläinen
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
Otto Kekäläinen
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
Otto Kekäläinen
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
Otto Kekäläinen
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
Otto Kekäläinen
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
Otto Kekäläinen
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
Otto Kekäläinen
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
Otto Kekäläinen
 

More from Otto Kekäläinen (20)

FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and UbuntuFOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
FOSDEM2021: MariaDB post-release quality assurance in Debian and Ubuntu
 
Search in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize itSearch in WordPress - how it works and howto customize it
Search in WordPress - how it works and howto customize it
 
MariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and UbuntuMariaDB quality assurance in Debian and Ubuntu
MariaDB quality assurance in Debian and Ubuntu
 
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
DebConf 2020: What’s New in MariaDB Server 10.5 and Galera 4?
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 editionTechnical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
 
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...The 5 most common reasons for a slow WordPress site and how to fix them – ext...
The 5 most common reasons for a slow WordPress site and how to fix them – ext...
 
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
How MariaDB packaging uses Salsa-CI to ensure smooth upgrades and avoid regre...
 
DebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoFDebConf 2019 MariaDB packaging in Debian BoF
DebConf 2019 MariaDB packaging in Debian BoF
 
The 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix themThe 5 most common reasons for a slow WordPress site and how to fix them
The 5 most common reasons for a slow WordPress site and how to fix them
 
How to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPressHow to investigate and recover from a security breach in WordPress
How to investigate and recover from a security breach in WordPress
 
Technical SEO for WordPress
Technical SEO for WordPressTechnical SEO for WordPress
Technical SEO for WordPress
 
Automatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themesAutomatic testing and quality assurance for WordPress plugins and themes
Automatic testing and quality assurance for WordPress plugins and themes
 
10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...10 things every developer should know about their database to run word press ...
10 things every developer should know about their database to run word press ...
 
Automatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress pluginsAutomatic testing and quality assurance for WordPress plugins
Automatic testing and quality assurance for WordPress plugins
 
Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)Improving WordPress performance (xdebug and profiling)
Improving WordPress performance (xdebug and profiling)
 
WordPress-tietoturvan perusteet
WordPress-tietoturvan perusteetWordPress-tietoturvan perusteet
WordPress-tietoturvan perusteet
 
Technical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 editionTechnical SEO for WordPress - 2017 edition
Technical SEO for WordPress - 2017 edition
 
Improving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP ProfilingImproving WordPress Performance with Xdebug and PHP Profiling
Improving WordPress Performance with Xdebug and PHP Profiling
 
MariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environmentsMariaDB adoption in Linux distributions and development environments
MariaDB adoption in Linux distributions and development environments
 
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
WordPress security 101 - WP Jyväskylä Meetup 21.3.2017
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 

How to publish your plugin as open source and contribute to WordPress

  • 1. How to publish a plugin at WordPress.org Workshop Otto Kekäläinen @ottokekalainen WordCamp Finland Tampere 9.5.2015
  • 2. Yes,you came to the right place!
  • 3. Step 0: Optional preparations for those with high ambitions Look at the source code of new plugins by respected authors.Is there something in the code structure, use of classes and namespaces and internal API that you want to model in your plugin? Read the Pear (PHP) and WordPress code style guides to make sure your code looks professional. Scan your code with PHP CodeSniffer for extra scrutiny.
  • 4. Step 2: Add readme.txt and license Every plugin published at WordPress.org must have a readme.txt file.Get https://wordpress.org/plugins/about/readme.txt and modify.Verify correctness with at https://wordpress.org/plugins/about/validator/ All plugins at WordPress.org must be licensed with GPLv2 or later or a license compatible with that.Personally I recommend GPLv3.  Include https://www.gnu.org/licenses/gpl-3.0.txt ,with filename LICENSE  Read recommendations about source code license headers in every file
  • 5. Check that file headers match readme.txt <?php /** * Plugin Name: WooCommerce MWS sync * Plugin URI: https://github.com/Seravo/woocommerce-mws * Description: This plugin syncs product inventories between Woocommerce and Amazon * Version: 1.0 * Author: Seravo Oy * Author URI: http://seravo.fi * License: GPLv3 */ /** * Copyright 2015 Seravo Oy * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License,version 3,as * published by the Free Software Foundation.
  • 6. Step 3: Publish at Github WordPress.org uses Subversion (svn) due to historical reasons.To maximize your chances of getting pull requests,publish and develop your plugin at Github. Later releases will be done by exporting the plugin from git to svn.
  • 7. Step 4: Submit at WordPress.org Read the guidelines to be sure you are doing the correct things https://wordpress.org/plugins/about/guidelines/ Create and account at WordPress.org and then submit the plugin at https://wordpress.org/plugins/add/
  • 8. Step 5: Review Wait for feedback from the reviewers.Can take from days to weeks. Fix all issues until passes review.
  • 9. The email you are waiting for! [WordPress.org Plugins] Request Approved: woocommerce-mws-sync Your plugin hosting request has been approved. Within one hour,you will have access to your SVN repository at http://plugins.svn.wordpress.org/woocommerce-mws-sync/ with your WordPress.org username and password (the same one you use on the forums). Here's some handy links to help you get started. Using Subversion with the WordPress Plugins Directory https://wordpress.org/plugins/about/svn/ Enjoy!
  • 10. Step 6: Use WordPress.org SVN Once accepted,you get access to the SVN repository where WordPress.org hosts your plugin. Add your plugin to the SVN directory trunk/ Add banner and icons to the SVN directory assets/  banner-772x250.jpg  icon-128x128.png  icon-256x256.png
  • 12. Please tweet to @ottokekalainen with a link to your plugin if you published with the help of this presentation!
  • 13. Step 8: Upgrade You can release upgrades by committing to SVN new versions where the readme.txt has been modified to have a bigger version number. For version numbers please follow the principles stated at semver.org. Tools for git to svn syncing will do the repetitive things for you  https://github.com/Seravo/git-to-wordpress-plugin-svn-pusher
  • 14. Coding standards The coding standards of WordPress and PHP/PEAR: https://make.wordpress.org/core/handbook/coding-standards/php/ http://pear.php.net/manual/en/standards.php You can automatically check if the code follows coding standards using PHP Code Sniffer: sudo apt-get install php5-cli php-pear sudo pear install PHP_CodeSniffer php -l example.php # Check for syntax errors phpcs example.php # Check for coding style (defaults to PEAR standards)
  • 15. PHP CodeSniffer with WordPress standards Installation example on Ubuntu sudo -s cd /usr/share/php/PHP/CodeSniffer git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs cd Standards ln -s ../wpcs/WordPress* . exit phpcs -i The installed coding standards are Squiz, PHPCS, PEAR, PSR2, WordPress-VIP, PSR1, WordPress-Core, MySource, WordPress, Zend and WordPress-Extra phpcs --standard=WordPress *.php -------------------------------------------------------------------------------- FOUND 587 ERRORS AND 16 WARNINGS AFFECTING 238 LINES -------------------------------------------------------------------------------- 36 | ERROR | [x] Tabs must be used to indent lines; spaces are not allowed 36 | ERROR | [x] Line indented incorrectly; expected at least 1 tabs, found 0 37 | ERROR | [x] Tabs must be used to indent lines; spaces are not allowed 37 | ERROR | [x] Line indented incorrectly; expected 1 tabs, found 0 37 | ERROR | [x] Expected 1 spaces after opening bracket; 0 found 37 | ERROR | [x] Expected 1 spaces before closing bracket; 0 found
  • 16. Example of a .git/hooks/pre-commit for PHP developers https://gist.github.com/ottok/ee1384d8229e83b6486e #!/bin/bash for FILE in $(git diff --cached --name-only); do if [[ "$FILE" =~ .php$ ]]; then php -l "$FILE" 1> /dev/null if [[ $? -ne 0 ]]; then echo -e "e[1;33mAborting commit: PHP code contains syntax errorse[0m" >&2 exit 1 f f done for FILE in $(git diff --cached --name-only); do if [[ "$FILE" =~ .php$ ]]; then phpcs -n "$FILE" if [ $? -ne 0 ]; then echo -e "e[1;33mAborting commit: PHP code violates coding standardse[0m" >&2 exit 1 f f done
  • 17. Example of a .git/hooks/pre-commit for PHP developers -sceenshot
  • 18. Pro WordPress development environment In bigger projects it will be useful to have a proper development environment setup, that includes PHP CodeSniffer,xdebug etc tools pre-installed in a Vargant image: https://github.com/seravo/wordpress
  • 19. Contact Seravo if you need experts in WordPress or other open source software Open seravo.f See our blog for in-depth tips