Tag: wordpress

  • Failing to update a very old WordPress version

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

    Installation Failed

    If you receive the above error when updating a stale installation of WordPress read on.

    Every installation of WordPress comes with its own Certificate Authority (CA) file which gets refreshed automatically upon each version update. If you have not updated your installation of WordPress for a few years the certificates within have expired and therefore cURL will not be able to verify the integrity of the server you are connecting to and fail the download and update process.

    Verifying the chain of trust is important to avoid pulling WordPress from the wrong source in the event that you may be exposed e.g. to a man in the middle (MITM), DNS hijacking, etc. scenario.

    To resolve the issue we need to break out of this catch 22 situation where we need the latest version of WordPress to update to the latest version of WordPress… d’oh!

    Some would simply download a fresh WordPress installation directly on the server, however it can be error prone risking your old installation’s data, plus the fact that the included updater runs its checks and updates both core files and database. So the quickest way is to simply overwrite the old certificates file at wp-includes/certificates/ca-bundle.crt with the latest one from WordPress’ development repository:

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

    Once replaced cURL will no longer have any issues connecting to WordPress, retrieving the latest version and completing the update.

  • Google+ integration

    I wanted a tighter integration with my blog and my Google+ stream to avoid having to visit two places.

    I have added a little widget which will display the latest posts.

  • Lightbox 2 and XHTML 1.1 validation

    I recently started using the Lightbox 2 WordPress plugin on my Marbella news site to automatically add the zooming overlay effect to certain images. It is really plug & play and works out of the box.

    I did encounter however that my pages stopped validating as XHTML 1.1 which is the standard doctype on all sites I develop.

    The error in question is due to the square brackets (“[” and “]”) being used to link individual images in one single post together as a gallery under the “rel” attribute. The square brackets are not permitted characters and therefore the W3 Validator spits out the following error message:

    character "[" is not allowed in the value of attribute "rel"
    It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.

    To avoid this XHTML 1.1 validation problem simply edit the following line in the Lightbox 2 plugin file named lightbox2.php under the “autoexpand_rel_wlightbox” function:

    from:

    $replacement    = '$1 rel="lightbox['.$post->ID.']">';

    to:

    $replacement    = '$1 rel="lightbox_'.$post->ID.'">';
    

    You should now be able to validate that plugin’s output as XHTML 1.1 with no issues.