WordPress media error

How to fix WordPress media not showing and not uploading?

I had the issue of my WordPress media not showing and when I try to upload another image I get an error. I tried all I could find online nothing worked, I even downloaded videos but still same issue never got resolved, not until I did what I would be showing you in a moment. Below are what the errors look like

wordpress media error
Blank wordpress media error. The images are there but do not show.
wordpress upload error
Error gotten when you try to upload a file or and image

What caused my wordpress media error

What caused my issue of no WordPress media not showing my images, was SSL (Secure Socket Layer) conflict, I have a domain name “mygistmate.com “, which I got SSl for, but my WordPress settings was still working without the SSl certificate. Like the below image.

mygistmate.com https
What my wordpress setting was showing

You will notice the above image shows Http://, instead of Https://, even though my domain name have the SSL certificate. Let me show you how i fixed that.

Step 1: You have to SSH to your wordpress directory. you can use FTP client or WinSCP. I use WinSCP. We are going to change the directory permission for your uploads folder, found in htdocs/wp-content/uploads.

Right click on it go to properties, then change Octal to 0777 instead of the initial 0755, and check the box for Set group, owner and permissions recursively found below. click OK once done.

SSH
Uploads folder property

Step 2 Navigate to the wp-config.php right in the htdocs folder, double click on it to open it.

The contents

define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);
define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);

Should be edited by changing the http:// to https://
wp mygistmate
Also Add define( ‘UPLOADS’, ‘wp-content/uploads’ );
right before require_core ABSPATH . ‘wp-settings.php’;
wp set
It should finally look like this, then click save.
https mygistmate
Now my wordpress setting shows https:// and i can view my media file and upload as well.

You will need a wordpress plugin (Really simple SSL)

Download and install Really simple SSL plugin on your wordpress and activate it, in other for it to fully convert your http into https. Steps below

wordpress ssl plugin
Click on Plugins in your Admin Dash board, and the add new
First search for Really simple Ssl then click install and then activate it

After activating Really simple Ssl, goto its setting and enable Mixed Content fixer ( this convert all your http files,image,video etc into https with one click to fully make your website secure.

Enable Really simple SSL as show in the image

To learn more about configuring Really simple SSL click here