Jesús Amieiro

A certificate created with Laravel Valet is not valid

Yesterday, I got this error in my local environment, with Laravel Valet:

your connection is not private

When I clicked on the “Advanced” button, I got this information: the certificate was expired.

To solve this problem, you need to unsecure the local domain (glotpress.test in my local environment):

valet unsecure glotpress.test

Then you need to remove the certificates for this local site:

rm ~/.config/valet/Certificates/glotpress.test.*

And, finally, secure the local domain another time:

valet secure glotpress.test

Now the certificate is valid.

Note: sometimes, the last command valet secure glotpress.test doesn’t work. A workaround that worked for me is to access to the folder of the site and then execute the command to secure the site:

cd /Users/myuser/code/wordpress/glotpress
valet secure
Exit mobile version