curl ssl certificate error on wordpress update

Issue Details:

When you try to update an old wordpress installation through wordpress admin panel and you gets following error:

Update Failed: Download failed. cURL error 60: SSL certificate problem: unable to get local issuer certificate

Reason:

Sometime a wordpress never updated on a period of time or you moved an outdated wordpress to another server that does not matches with new server ssl certificate, or you uploaded an old wordpress backup and now trying to update it, you could be ended up in above error.

Solution:

First you need to remove that CA certificate and download the updated one.

1. Connect SSH as root user or a cpanel user by terminal as well.

2. Navigate to wordpress installation path and go to wp-includes/certificates folder. Path would be: (/home/$user/public_html/wp-includes/certificates)

3. Move the old CA bundle out to a different folder

mv ca-bundle.crt{,.$( date +%Y%m%d )} /temp

4. Now in the same directory download the latest CA bundle from WordPress:

wget https://raw.githubusercontent.com/WordPress/WordPress/refs/heads/master/wp-includes/certificates/ca-bundle.crt

5. If you downloaded the file as root user then you might need to correct the permission of downloaded file to match the cpanel user. Use following command by replacing actual username to change permission to that user:

chown -v $user: ca-bundle.crt

6. Now login to WordPress admin and retry the wordpress update. That will not update successfully.

icon 01

Where We Are

P50 Plaza, 2nd Floor, Chenab Market, Susan Road, Faisalabad, Pakistan

icon 02

Tech Support

(+92)-311-4991414

icon 03

E-mail Us

sales@xoftmade.com

support@xoftmade.com