WordPress directories not writable after PHP version upgrade

Resolved by editing the following file:
/etc/php-fpm.d/www.conf

You can set user:group for php-fpm to reference for the web handler via the following lines:

; Unix user/group of processes 
; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. 
; RPM: apache user chosen to provide access to the same directories as httpd 
user = nginx 
; RPM: Keep a group allowed to write in log dir. 
group = nginx 

It defaults to apache:apache

Changed this to nginx:nginx and restarted php-fpm:

systemctl restart php-fpm.service