you can try this:
Step 1: Turn off the PlayStation 4 by pressing the power button on the front panel. The power indicator will blink for a few moments before turning off.
Step 2: Once the PlayStation 4 is off, press and hold the power button. Release it after you've heard two beeps: one when you initially press, and another 7 seconds later.
Step 3: Connect the DualShock 4 controller with the provided USB cable and press the PS button on the controller.
Step 4: From the list of options select Rebuild Database and press “X”. Once the process is complete the PS4 will restart.
Step 5: Run the Internet connection test at [Settings] > [Network] > [Test Internet Connection] and make sure you can connect to the network.