WordPress wp-admin redirecting to old domain after migration

Ok, so I have a WordPress installation on an Ubuntu server running Nginx (created with EasyEngine) hosted on a DigitalOcean VPS. I cloned the vps, went into the websitename.com file in /etc/nginx/sites-available/ and changed the domain name and I also changed websitename.com to newwebsitename.com and pointed the new domain to the new cloned vps. Opening a browser and going to newwebsitename.com works and I can see the wordpress website perfectly. However, when I point my browser at newwebsitename.com/wp-admin, it automatically redirects to oldwebsitename.com/wp-admin. What needs to be done? What am I missing? What am I doing wrong?

Thank you,

Hello Adriano,

You need to add following lines in your wp-config.php file.

define('WP_HOME','http://newwebsitename.com'); define('WP_SITEURL','http://newwebsitename.com');