How to fix cURL error (77) when do WordPress update
Today when I do update plugins on my WordPress site I met the following error screenshot. I searched curl error codes and found it caused by SSL. The error message is Problem with reading the SSL CA cert (path? access rights?).
I searched in Google and according to my server details, I fixed it with the following steps.
My Server has Plesk installed so it doesn’t suit you if you use another panel.
Step 1: get where your Plesk installed
Connect to your server by SSH.
If you use Mac then you may open Terminal and enter the command:
ssh root@xxx.xxx.xxx.xxx
After connecting to your server, please enter the command:
vi /etc/psa/psa.conf
And then you’ll see the Plesk path at the beginning of the conf file as the following.
Click ESC and then enter q! will let you quote vi.
Step 2: open / create panel.ini and update / add settings
You need to open or create the file of PLESK_PRODUCT_ROOT_D/admin/conf/panel.ini if it doesn’t exist.
In my server, the file doesn’t exist and I created a new one. Plesk already prepares a sample file there so I just copied it.
Enter the command: vi panel.ini and you’ll see Plesk already prepared settings but just comment them. Move down to the end of the file and add the following codes and save the file:
curlCertificatesUrl=”http://curl.haxx.se/ca/cacert.pem
Click keyboard i enter inserted mode to paste the above codes in vi. Click ESC and enter :wq will save and quote vi
Step 3: download the cacert.pem file
Enter command: cd /PLESK_PRODUCT_ROOT_D/Additional/PHPSettings/ .
If /Additional/PHPSettings/ doesn’t exist then just use the following commands to create them.
Enter the command: mkdir Additional
Enter the command: cd Additional
Enter the command: mkdir PHPSettings
Enter the command: cd PHPSettings
Then download the cacert.pem from http://curl.haxx.se/ca/cacert.pem.
Enter the command: wget http://curl.haxx.se/ca/cacert.pem
Step 4: execute Plesk daily task
Enter the command: Plesk daily
Wait until the command executed. If your server doesn’t have a “Plesk daily” command then it because your Plesk version is old and you have to wait one day until Plesk executed automatically.
Step 5: get the PHP version which run on your server
Open Plesk and click: Websites & Domains
And you’ll see PHP version as the following screenshot:
Step 5, change PHP settings for all your sites
In Plesk, navigate to Tools & Settings –> General Settings –> PHP Settings
Open the link of the FastCGI application for your PHP version.
Click the “ini” table and add the following to the ini file and save it.
curl.cainfo = /PLESK_PRODUCT_ROOT_D/Additional/PHPSettings/cacert.pem
PLESK_PRODUCT_ROOT_D is the value that reads from psa.conf. In my case it is /usr/local/psa/
That’s all, now it will be OK when you do update again
Post a Comment