---
title: "Warning: An unexpected error occurred."
date: "2014-11-11"
category: "wordpress"
slug: "warning-an-unexpected-error-occurred"
---

## Overview

When installing a plugin or updating WordPress, the following error appears:

> Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server's configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home/virtual/.../wp-includes/update.php on line 119

## Cause

Older [[determining-platform-version]] (v4) do not support SHA256 certificate validation, which WordPress.org now requires for secure connections.

## Solution

Request a migration to a newer platform via the [[logging-into-the-control-panel]] under **Help** > **Trouble Tickets**. Newer platforms support SHA256 certificate validation along with other security and performance improvements. See [[migrating-another-server]] for details.

### Temporary Workaround (Not Recommended)

If migration is not immediately possible, you can disable SSL verification by adding the following [filter](https://codex.wordpress.org/Plugin_API) to the end of your `wp-config.php` file:

```
add_filter( 'https_ssl_verify', '__return_false' );
```

**Warning:** This disables all SSL verification for WordPress HTTP requests, leaving your site vulnerable to [man-in-the-middle attacks](https://en.wikipedia.org/wiki/Man-in-the-middle_attack). Use this only as a temporary measure until you can migrate to a supported platform.
