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
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.
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.
Step 2 Navigate to the wp-config.php right in the htdocs folder, double click on it to open it.
define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);
define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);
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
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.
To learn more about configuring Really simple SSL click here