Disable Everything in WordPress when Testing or Troubleshooting

Intro

From time to time you backup or clone a site and restore it to a temporary domain for testing or troubleshooting. This guide talks about completely disabling automations and emails that might cause problems.

Email

There's two plugins that would really well to disable emails and log them.

wp plugin install --activate disable-emails log-emails

Action Scheduler

wp plugin instsall --activate https://github.com/Prospress/action-scheduler-disable-default-runner/archive/master.zip