Wired Test: Connect Ethernet cable directly to router. If it works, Wi-Fi is the issue.
PS3 Network Settings: Settings → Network Settings → Internet Connection → Custom → Auto-Detect → Auto MTU → Do Not Use Proxy → Enable UPnP. Test Connection.
Date/Time Sync: Settings → Date/Time → Set via Internet (auto). Wrong date breaks SSL/TLS handshake.
Router Firewall / Port Forwarding: Open TCP 80, 443, 5223, 3478–3480; UDP 3478–3479, 3658. Enable UPnP.
DNS Change: Primary 8.8.8.8, Secondary 8.8.4.4 (or 1.1.1.1 / 1.0.0.1).
Rebuild Database: Safe Mode (hold power for 2 beeps) → Option 5. Fixes filesystem corruption.
System Update: Settings → System Update → Via Internet / USB.
If all else fails: Your ISP may block Sony CDN ports. Contact them or use a VPN (PC hotspot → PS3 Wi-Fi).