Wordpress Redirects to a cancelled domain, need to change it but can't get to the admin portal
I am working with a WordPress site on AWS wherein the site was mapped to a specific domain. That domain has long since been sold and canceled, so I want to change the domain to something else to access the site content.
The issue is, when attempting to navigate to the admin portal through /wp-admin or /wp-login.php or similar, the site redirects me to the naked domain which obviously fails since the DNS is no longer configured there.
Can you help me fix this issue through the Linux command line or SFTP? I feel like I have tried everything, but the site is still redirecting.
Any information you have would be appreciated, thanks.