Mark Wilkinson @markwilkinson.dev 路 Nov 19

Top tip for all #WordPress users. Change the colour of your admin dashboard depending on whether your are dev, staging or live. Prevents confusion on which env you are in. I go for: Default - local/dev Blue - staging Sunrise - Live Do you do anything specific for specific environments?

10 likes 8 replies

?

Replies

Mark Wilkinson 路 Nov 19

You could even write some code to automate the change based on the current env probably utilising wp_get_environment_type() developer.wordpress.org/reference/fu...

Delia Carballo 路 Nov 20

I use sunrise for dev 馃槤

Gary Jones 路 Nov 19

Pretty sure there鈥檚 a plugin that does something similar - adds an environment label in the admin bar too (because we all know that we shouldn鈥檛 rely on colour alone to convey information, right? 馃榿).

Shane Rounce 路 Nov 19

I might build and release this soon, if you're interested in testing it? It's got day/night mode overrides and live preview changes, right from the admin bar. :D

Simon Blackbourn 路 Nov 19

I wrote a must-use plugin that checks the WP_ENVIRONMENT_TYPE constant, and adds an admin bar node with the environment name on a bold background colour. Green for local, orange for staging, red for production.

Andreas M酶ller 路 Dec 17

Even better: kill the staging environment youtu.be/bXlAc63Ga3c?...

Robin 路 Nov 19

Great advice! I usually code that in at the template level too, basing that on the current URL and programatically setting the top admin bar (so it's also visible on the front-end when editing)

Stefan Velev 路 Nov 19

I do pretty much the same, just with some color variations!