Productivity 101: Making a Easily Re-deployable Dev Environment with Subversion
WordPress Harrisburg Meetup - Best Practices
1. doing_it_right() with
Wordpress
Ryan Duff
Harrisburg WordPress Meetup
February 19th, 2013
2. Why do it right
• Save yourself time
• Save others time
• Save your clients money
• Save everybody from headaches
3. Ways to do it right
• Learn to organize your code
• ... document your code
• ... optimize your code
• Don’t reinvent the wheel
• Action Hooks and Filters
• Other very bad things to avoid
4. First things first
• Use the debug bar plugin
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_DISPLAY, false);
define(‘SAVEQUERIES’, true);
5. Organize your code
• What goes in a plugin?
• What goes in a theme?
• Utilize mu-plugins/
10. Optimize your code
• Make sure the code you’re expecting matches
• Use $wpdb class in the correct cases, WP_Query otherwise
• Sanitize everything
http://codex.wordpress.org/Data_Validation
11. Don’t reinvent the wheel
• Clever code is not clever.
• Use built in APIs and methods