How can I add a title to this ‘maintenance mode’ function?

You can pass a title to the wp_die() function or even any other HTML content like heading tags: https://codex.wordpress.org/Function_Reference/wp_die But if you are trying to have more control over what’s being outputted, you should use the template_include filter and use your custom template: https://codex.wordpress.org/Plugin_API/Filter_Reference/template_include EXAMPLE: add_filter( ‘template_include’, ‘show_maintenance_page’, 99 ); function show_maintenance_page( $template ) { … Read more

I have a snippet to redirect all users to a maintenance page. How do I exclude users with admin role?

I would advise againt using anonymous functions for callback (when ever you can) as you can’t use a targeted remove_action on it. What Maythan8 answered will work but it can be done with fewer functions. add_action(‘template_redirect’, ‘bt_maintenance_redirect’); function bt_maintenance_redirect () { if (is_page(4848) || current_user_can(‘administrator’)) return; if (wp_safe_redirect(esc_url(home_url(‘maintenance/’)))) exit; } You used esc_url_raw but this … Read more

What are the best practices for maintaining and deploying several parent themes?

While I agree with Justin Tadlock on a lot of things, I strongly disagree with him on this. The reason parent/child themes exist is that there’s a lot of common functionality used across websites. Instead of re-inventing the wheel every time, it’s better to build from a solid base that has been tested by hundreds … Read more

How can I permanently cache or “archive” a WP blog without needing future maintenance

I think HTML mirror is the way to go here. There is no point keeping dynamic site that doesn’t need to be. And leaving it unmaintained is not really possible on auto-pilot – even if updates are automatic there is no guarantee some plugin won’t get just dropped by developer. Alternatively you can build multi-design … Read more

Why would a WordPress site go into maintenance mode without me doing anything?

The short answer is yes. WordPress does go into maintenance mode when updates are are installed. You have nothing to worry about. This is default behavior. I do know that there are sometimes issues where WordPress gets stuck in maintenance mode after updates, but if you don’t experence such issues, you are good to go … Read more