When it comes to write code you don't need to learn magic spells.
All you need is to take a look outside the window and solve your problem with patterns from the real world.
How to proxy wp-admin in a headless wordpress setup.
Did you know that you can't print any recovery code for your AppleID account? The more you protect it, the more is likely you loose control over it. And do you travel a lot? Then you'd better read this!
How to squeeze Wordpress/MySql to the bare minimum memory consumption - and survive.