The day you hand a site over, the risk changes. Before, the only person editing was you. After, it’s someone who just wants to update the opening hours and doesn’t know that the Site Editor changes every page at once, or that a custom colour picked today won’t match the brand guide tomorrow.
None of this is about distrust. A focused editor is easier to use, and clients make fewer mistakes when the options in front of them are the ones that make sense for their site.
Most snippets below check for administrators and leave them alone. The Site Editor lock has a switch in wp-config.php. Keep your own account as administrator and give the client Editor, unless they truly need to install plugins.
Lock the Site Editor and templates
On block themes, anyone who can change theme options can open the Site Editor and edit the header, footer and templates for the whole site. Post editors can also switch into template editing from the sidebar. This turns both off, including the direct link to the Site Editor:
When you need to make design changes, add define( 'NAHNU_ALLOW_SITE_EDITOR', true ); to wp-config.php. Everything comes back. Remove the line when you’re done. Templates and styles you’ve already built keep working the whole time.
Keep colours and font sizes on brand
By default, every colour and size control has a “custom” option, so any shade of any colour is one click away. Remove the custom picker and size input, and editors choose from your theme’s palette and sizes only:
Do the same for drop caps and custom letter spacing, text decoration and font styles on paragraphs:
And remove block styles that don’t fit your design, such as the rounded image style:
On block themes, you can switch off custom colours and font sizes in theme.json instead. The snippet is useful on classic themes, or when you don’t want to edit the theme.
Take away the code editor
The block editor’s Code editor view shows the raw block markup. It’s handy for developers and an easy way for anyone else to break a page. Hide it from everyone except administrators:
Decide who can lock blocks
Block locking stops a block being moved or removed. It’s how you protect a layout inside a page. But if editors can lock and unlock blocks too, the protection only lasts until someone clicks unlock:
Remove the extras
The block inserter offers plenty of things that come from outside your site. Clients rarely need them, and each is something they can add that you didn’t design for.
Default block patterns, so the inserter only shows patterns you made:
The block directory, which offers to install new blocks from WordPress.org when a search finds nothing:
Openverse, the library of free images in the Media tab, so editors use your own media:
The font library, so nobody installs new fonts from the Site Editor:
Embed variations you never use, like Tumblr or Crowdsignal, to shorten the inserter:
Log in as the client’s Editor account. Appearance has no Editor item, colour controls show only your palette, there’s no Code editor in the options menu, blocks can’t be locked or unlocked, and the inserter shows only your own patterns and media.
Summary
Lock the Site Editor first, since it affects every page. Then keep colours, sizes and styles on brand, hide the code editor and block locking from non-administrators, and remove the patterns, directories and libraries that come from outside the site. Test with the client’s own role, not your administrator account.
Check your understanding
Was this helpful?
Sorry about that. What was missing?
Thanks for your feedback!

