23
Sudar Muthu | @sudarmuthu #WCKochi Developer Tools to increase your Productivity as a WordPress Developer Sudar Muthu (@sudarmuthu) http://sudarmuthu.com

WordPress Developer Tools to increase productivity

Embed Size (px)

Citation preview

Sudar Muthu | @sudarmuthu #WCKochi

Developer Tools to increase your Productivity as a WordPress Developer

Sudar Muthu (@sudarmuthu)http://sudarmuthu.com

Sudar Muthu | @sudarmuthu #WCKochi

Me• Programming in PHP for more than a decade and in

WordPress for about 8 years.

• Big fan of automating process and workflows.

• Contributor to a couple of open source projects including WordPress.

• Released about 2 dozen plugins in WordPress.

• Remote worker at 10up (and yes 10up is hiring :) )

Sudar Muthu | @sudarmuthu #WCKochi

What about you?• Are you a developer?

• What is your experience with PHP and WordPress?

• What is your typical development environment?

• Do you prefer GUI tools or cli tools?

• What are your expectations out of this talk?

Sudar Muthu | @sudarmuthu #WCKochi

IDE

Sudar Muthu | @sudarmuthu #WCKochi

https://xkcd.com/378/

Sudar Muthu | @sudarmuthu #WCKochi

IDE• I have used vim extensively and recently moved to

PhpStorm (still use vim mode)

• Move away from generic text editors and prefer an IDE.

• Look for WordPress integration.

• Look for integration with other dev tools that you use (phpcs, wp-cli etc)

• Look for xDebug support.

• Pick one that you are comfortable with.

Sudar Muthu | @sudarmuthu #WCKochi

Demo

Sudar Muthu | @sudarmuthu #WCKochi

Local Development Environment

Sudar Muthu | @sudarmuthu #WCKochi

Local Development Environment

• I use VVV and FlyWheel

• VVV for having a local environment that resembles production as much as possible using vv.

• I use FlyWheel to quickly create sites with different PHP versions (especially PHP 5.2)

Sudar Muthu | @sudarmuthu #WCKochi

Local Development Environment

• Pick something where you can easily create new sites.

• Ability to replicate production environment as closely as possible will be a plus.

• Don’t ever install PHP directly on Windows.

• Other popular options include Wamp, Xamp etc.

Sudar Muthu | @sudarmuthu #WCKochi

xDebug

Sudar Muthu | @sudarmuthu #WCKochi

xDebug

• PHP extension that allows you to step through code for debugging. Very powerful.

• I use it with VVV and PhpStorm.

• Helped me to debug lot of complex problems.

• Use IDE integrations to save time.

Sudar Muthu | @sudarmuthu #WCKochi

Demo

Sudar Muthu | @sudarmuthu #WCKochi

wp-cli

Sudar Muthu | @sudarmuthu #WCKochi

wp-cli• I use wp-cli extensively for normal day to day

operations. Saves me lot of time.

• wp-cli shell opens an interactive shell. Very handy to quickly test some logic or read options/transient etc.

• wp-cli ssh can be used to run commands on a remote server.

Sudar Muthu | @sudarmuthu #WCKochi

Demo

Sudar Muthu | @sudarmuthu #WCKochi

PHP CodeSniffer

Sudar Muthu | @sudarmuthu #WCKochi

PHP CodeSniffer• Static code analyser that captures common code

problems.

• Use a custom phpcs standard for your project on top of WordPress standard.

• Integrate it with your IDE or with git using pre-commit hook.

• I use it with both PhpStorm and vim.

Sudar Muthu | @sudarmuthu #WCKochi

Demo

Sudar Muthu | @sudarmuthu #WCKochi

PHPUnit

Sudar Muthu | @sudarmuthu #WCKochi

PHPUnit

• Unit testing framework used by WordPress core.

• Definitely check WordPress core unit tests.

• Set it up using wp-cli (Don’t try to set it manually)

• Refer to my talk about Unit testing for WordPress at WordCamp Pune.

Sudar Muthu | @sudarmuthu #WCKochi

Closing Remarks

• Use something that you are comfortable with.

• Always try to automate as much as possible.

• Have fun :)

Sudar Muthu | @sudarmuthu #WCKochi

Thank You@sudarmuthu

http://sudarmuthu.com https://github.com/sudar