How to avoid live-site editing and setup an efficient workflow for the development of WordPress plugins and themes.
Good and bad
Editing and testing on a live website is in general bad practice but of course is very quick and handy if your site is not a main one and interested by few visits per day. The process of setting up an efficient environment is most of the time considered unnecessary but will pay in the end if you decide to share your code and provide updates.
In the proposed workflow a local WordPress installation and DB are used to develop and integrate themes and plugins. Each of them is stored outside the WordPress installation in its own folder (symlinked) that is also the working directory of the theme/plugin Git repository. This way the code can be seamlessly committed and versioned; moreover a GitHub “release” can provide a first way to distribute your component to the public. On the remote live site (to dry-run the code) the WPPusher plugin is configured to receive new files from the Git repository every time the code is pushed to it.
TODO: distribution to WordPress.org library
Eclipse and WordPress
WordPress and GitHub
Use WPTest.io locally to test your product.
theme validation plugin: https://wordpress.org/plugins/theme-check/
theme validation http://themecheck.org/
W3C HTML validation:
single page — http://validator.w3.org/
entire site — http://www.htmlhelp.com/tools/validator/
WordPress Editor stylesheets
Resources and how-to