On March 9th Sony released firmware update version 4.50 to the PS4 and PS4 Pro.
Soon after, some users started experiencing WiFi connection problems and were complaining about it in the forum. After updating they say you get error NW-31297-2 indicating the password is incorrect which it isn’t.
Not until recently did Sony finally acknowledged the issue and told Polygon, “We are aware and are looking into the situation.”
So far no solution has been provided. If you see the most recent posts in the forum people seem to be narrowing down the problem. Possibly something with specific modem models.
Are you stuck on the same boat? What did you do? Ethernet?