cron daily and weekly scripts for a minimal Nginx server environment
As mentioned by cas in the discussion, you can simplify your loops:
for dir in /var/www/html/*/; do
    if pushd &quot;$dir&quot;; then
        /usr/local/bin/wp plugin update --all --allow-root &amp;&amp;
        /usr/local/bin/wp core update --allow-root &amp;&amp;
        /usr/local/bin/wp theme update --all --allow-root
        popd
    fi
done

You can also “simplify” the chmod calls:
find /var/www/html/* -exec chmod a-x,a=rX,u+w {} \+

This processes directories and files in one go, and calls chmod as few times as possible (\+ instead of \;). Using the recursive flag to chmod means you can also drop find:
chmod -R a-x,a=rX,u+w /var/www/html/*

In the weekly job,
for dir in /var/www/html/*/wp-content; do cd &quot;$dir&quot; &amp;&amp; cd cache &amp;&amp; rm -rf *; done;

should be doable as
for dir in /var/www/html/*/wp-content/cache/; do rm -rf &quot;${dir}/*&quot;; done

instead, or even
rm -rf /var/www/html/*/wp-content/cache/*

The \+ comment regarding find is also relevant here.
I highly recommend using “proper” backup tools instead of ad hoc backups (but it’s great to have backups, whatever they are). In particular, automysqlbackup is packaged in Debian and works great for MySQL backups, with automatic pruning and nice password handling; I find BorgBackup great for file archiving.
As cas also tried to suggest, you could do away with the heredocs and perhaps make life simpler for yourself by retrieving the scripts directly. One way to do this would be to store them separately, alongside nses.sh, and retrieve them either as part of a git clone or using curl.