Developing for Enterprise

🚀

WordPress is Kind of a Big Deal Now

So... What's different about working with these clients?

Security

Security

Security

Security

Never Trust Any Data

Sanitizing

$my_field = sanitize_text_field( $_GET['my_field'] );

Late Escaping

<?php echo get_the_title(); ?>

<?php echo esc_html( get_the_title() ); ?>

Verifying identity

wp_verify_nonce( $_POST['my_nonce'] )

Performance

Tricks to speed Up Queries

$query = new WP_Query( [
	'posts_per_page'         => 50,
	'no_found_rows'          => true,
	'update_post_term_cache' => true,
	'update_post_meta_cache' => true,
] );

Cache All the Things, All the Time

Edge Caching/CDN


https://cloudfront.com

Object Caching


https://i-msdn.sec.s-msft.com/dynimg/IC239280.jpg

Object Caching

$cache = wp_cache_get( 'my_key' );
if ( ! $cache ){
       $cache = my_expensive_query();
       wp_cache_set( 'my_key', $cache );
}

return $cache;

WorkFlows

Client generally sets workflows, not you

Code Reviews Are Mandatory

  1. We internally review
  2. Client/QA team reviews functionality
  3. Host reviews before deployment

Gitflow!

Working in Multiple Environments

Local
Dev
SI
Staging
Live

Your Host

aka: Your new best friend

Everything is Scratch-Built

If a Plugin doesn't meet 95% of what we need, we custom-build

Scale Brings Out... Interesting Bugs

#becauseWordPress 🔥

🎉 It's loads of fun 🎉

Ask Me Anything

🙏

Byeee 👋

MikeSelander.com
@Mike_Selander