Installing wordpress breaks SSL

Website installs ok with SSL ticked from within Cyberpanel with https working fine but when I install WordPress and do HTTP to HTTPS rewrite, and non-www to www rewrite the site either then has broken SSL or redirect loops


Ubuntu 22.04

Cyberpanel:
Current Version: 2.3
Build: 4
Current Commit: a2a2bd93a3957bcae0af42e8c5fbf1184cf847cc
Latest Version: 2.3
Latest Build: 4
Latest Commit: a2a2bd93a3957bcae0af42e8c5fbf1184cf847cc