Frederick Townes is the founder of W3 Edge, CTO at Mashable and author of W3 Total Cache. He’s presenting today on WordPress theme performance best practices.First, he recommends contributing back to the WordPress Codex because everyone in the room thinks it could be improved.
Pay lots of attention to the hierarchy with page templates.
Think about how many files you’re loading into memory, and the overall footprint they end up consuming. You can track this down using xdebug.
- The larger the heap, the greater the execution time.
- “Graduate” groups functions to plugins.
- The fewer files the better.
- Explore and use microformats for reviews, businesses & organizations, products, and people.
- Use external services and fail gracefully.
W3 Total Cache has a debug mode that will show you what’s being cached on a request and what’s being missed.
Trick to debug on production:
define( 'WP_DEBUG', true );
// log to wp-content/debug.log, useful tests on production
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );