Transients vs Object Cache
Transients are short-lived cached values with optional expiry. By default they live in the options table. With a persistent object cache (Redis, Memcached) they live…
Read article →Available for work
Interested in working together? Let's talk.
Transients are short-lived cached values with optional expiry. By default they live in the options table. With a persistent object cache (Redis, Memcached) they live…
Read article →WP-Cron runs on page loads. On low-traffic sites jobs may not run at all; on high-traffic sites a single request can run many jobs and…
Read article →WP-Cron is not a system cron — it is a check that runs on incoming requests. If no one visits the site, scheduled jobs do…
Read article →Set show_in_rest to true unless you have a specific reason not to — without it, the Gutenberg editor falls back to the classic interface.Set supports…
Read article →meta_query joins the postmeta table once per meta clause. Three meta clauses means three joins on a typically un-indexed table.Add a database index on (meta_key,…
Read article →block.json is the canonical block manifest. name uses the namespace/block-name form. apiVersion: 3 opts in to iframe rendering for parity with the front end.Use render…
Read article →The lowest-risk migration: keep the classic theme, add theme.json, and start using block patterns and blocks alongside existing PHP templates. The site stays the same;…
Read article →Declare every dependency in the array: wp_enqueue_script('my', ..., ['wp-element', 'jquery']). WordPress resolves the load order automatically.For modules use wp_enqueue_script_mod…
Read article →For modern enqueues, wp_add_inline_script with a script handle is cleaner than wp_localize_script. It does not require a global variable name.For block editor data, use wp.data…
Read article →Always pass a sanitize_callback to register_setting(). Without one, anyone with the right capability can write arbitrary data into the option.Match the callback to the data:…
Read article →