Wordpress featured images and media library thumbnail no longer displays - wordpress

I have a WordPress blog that is on a VPS. Everything has been working fine until today when I realised that my featured images are no longer displaying. I logged in to my dashboard, media library, and all the image thumbnails are no longer displaying properly.
Before this time, I had a little issue with my caching plugin (W3Total Cache), so I deactivated it, and my site continued to function normally. But now, no featured image is displayed all through the site. What amazes me is that inline images in a post are still displaying in the site. See example.
Now my site's homepage is just blank, because no featured images are displayed. As of today, images which I attached in the post are just seen as links, but if the link is clicked, it redirects to the image. Here are some of the things I've tried so far:
I've run df -h ssh command to verify if my diskpace is full.
I've restarted mysql server several times.
I've manually downloaded wordpress .zip file, and upload to the site.
I've automatically reinstall wordpress using http://www.example.com/wp-admin/update-core.php.
I've switched to a default theme.
I've tried some of the resources similar to this question here, but none of the proffered solutions resolved my issue.
My permission settings for all the sub-directories under wp-content is 755. I have also tried changing them to 775 and 777.
*. I've used the Regenerate Thumbnails plugin to try to regenerate the thumbnails, but it returned an error The error message was: The originally uploaded image file cannot be found at, but when I view the image directly from my browser, it returns the image.
I've also used the WP Original Media Path plugin to try and restore the media path (if it was messed up), but to no avail.
I've deactivated all plugins too.
I just checked my wp_postmeta table in my DB and it returned this error wp_postmeta table is marked as crashed
How do I rectify this issue?

Since the source of your homepage has nothing in the main section:
<section class="entry-content clearfix" itemprop="articleBody">
</section> <!-- end article section -->
and also due to the last item in your question, I assume you have a database problem instead of missing files (which I think would throw some 404s in my browser instead).
Do you have WP_DEBUG_LOG? If so, check wp-content/debug.log for errors. Be sure to launch phpMyAdmin and browse around the tables to see everything is good in there.
Use CHECK TABLE to confirm if tables are corrupted, and in that case use REPAIR TABLE to try to fix them (maybe phpMyAdmin has those in its GUI, I'm not sure right now).

In IIS -> Php Manager-> Php Extensions -> php_gd2.dll enable. refresh or restart the server it will work...
After long days try got this solution.

Related

Photos not uploading in Wordpress media manager

I am trying to upload images into the media manager of a Wordpress website for my clients. No issues last time I touched this website, which was about a month ago.
So far, I have:
Tried uploading images that are already in the media manager (same size, file, etc)
checked all permissions in the FTP (all permissions are fine)
disabled each plugin, 1 by 1, until all were disabled to test if that was the issue (it wasn't)
uploaded an image directly into the FTP to get it to appear (it didn't)
reset the upload location for the media manager (thought that was the issue, but it wasn't. More on that below)
made a lot of grumpy noises
tried uploading different files (didn't work)
Reinstalled the latest update of WP
So far, here's what I know:
When I click "edit image" the image appears in the editor
In the FTP, when I upload the image, it appears in the appropriate folder (public_html/wp-content/uploads/2021/11)
when I access the image from the FTP, it is there in all dimensions as created by WP
The URL of http(s)://company.com/wp-content/uploads/2021/11/name.jpg brings me to a blank page
No errors are returning in console expect that there is a missing resource
It's even worse on Safari (as opposed to Chrome), where none of my images are appearing
So far, every answer I can find for this problem involves the permissions for the files, none of which seem to affect anything for me. The files upload automatically at a 644 permission level, though I can change them to a 744 and still get nothing.
SOS and thanks for any help!
Unfortunately, I don't have much of an answer as to why it works, but I do have a solution.
I backed up my WordPress site using a plugin, then restored the backup. My plan was just to do the backup, then restore an old backup, but just in case I tried restoring the backup I just created seconds before—and voila, it worked. I don't know why, but hey! I have a solution.
So make a backup, and then restore that backup.
Thank you to #bossman for helping out in the comments.

How to Revert Back Previous Custom Media Storage Link on WordPress via Filezilla

Actually the previous developer use custom media storage for the wordpress
storage media by that we not able to add new media because it display error at the time of upload directory not created check its parent have the write access .. that type of error it shows. So to avoid that error we change the custom media storage link to default one: which is now.. wp-content/uploads
After that site is running fine but when I saw some images are showing thumbnail problem then after sometime site is down and it showing only error message.
Only way I have where I make it work again is by using Filezilla.
I had also make a backup of it. Which I restore after by using only the wp-config file. By that site is running again but As I said if I visit another of it pages which are basically full of products images then again site will down.
I tried so many things by adding code lines in wp-config file to add that custom link again which previous developer was use but all in vain.
I had update the link by login to the wordpress media settings. But now it not shows any area to add custom link anywhere.
define('UPLOADS',".'media');
I have also try that line of code by creating a folder in Wordpress with 'Media' and add all the media files into this but is also not work for me.
And Originally my media files path is /public-html/wp-content/uploads
I just want to resolve it by previously customized adding link option and also want to enable the permission to add new media without disturbing the already publish images and other media on the running wordpress site.
did the previous developer use /year/month/ structure and you simply copied everything from /media to /uploads?
i would say, edit directly the database. first, checkout the links in the field GUID
SELECT * FROM wp_posts where post_type='attachment'
the links are in the GUID field. Now take a database search and replace tool and replace the wrong paths on the whole db:
eg:
https://example.com/media with https://example.com/wp-content/uploads
and escaped
https://example.com/media with https://example.com/wp-content/uploads
and just to make sure, also replace the url-encoded versions (get it with this tool)
this should fix all permalinks as well as the links in the post-contents.

Error displaying oEmbed Wordpress

I've a problem with my wordpress website. When I insert some url for being embedded, it's not working fine.
Here is the issue URL : https://www.duosia.id/windows/cara-mengekstrak-files-menggunakan-winrar-dengan-mudah
And here is the Screenshot :
When I try to visit the embedded url. It's return 404 not found. You can check the embedded url here, https://www.duosia.id/windows/cara-mengekstrak-files-menggunakan-winrar-dengan-mudah/embed/
I've try these common solutions.
Update everything including WordPress, the theme and plugins. Available updates appear in Dashboard > Updates.
Deactivate all plugins in case there is a conflict. If the problem goes away while all plugins are inactive, then reactivate them one by one to determine which is causing the problem.
Switch to the default theme (such as Twenty Thirteen) then try to do what was not working. If the problem remains, it is a general WordPress or hosting issue. If it happens only while using our theme, please let us know.
Clear cache in both your browser and in any caching plugins that you are using (also disable services like CloudFlare, if used with your website).
Revert code changes if you have modified the theme’s code. If using a child theme, reactivate the parent theme.
But, seems no one work.
The WordPress post embeds don't seem to be working on your site.
This URL shows a live example of the problem:
https://www.duosia.id/windows/whatsapp-for-pc/
The two embeds present in that URL are returning a 404, therefore, oEmbeds are not loading properly and showing the 404 page:
https://www.duosia.id/windows/facebook-messenger-for-pc/embed/#?secret=kMPv636bx1
https://www.duosia.id/windows/line-for-pc/embed/#?secret=65m4VpxiYi
Have you tried testing those URLs in the plugin "Rewrite Rules Inspector"?
You should see something like this for any of the "embed" URLs:
index.php?name=$matches[1]&embed=true
Also, have you tried flushing the rewrite rules in WordPress or maybe setting the permalink structure to a different/default one (right now you seem to be using a structure of "category/post-name") to see if it changes anything?
For the file that you are embedding, are you uploading it to the Media Library or some other plugin?
First I would check on the server to verify that the file you are looking to access does exist.
Once you know that the file does exist, then repeat the steps you have listed again.

Wordpress pictures and thumbnails not working

I've been having a few problems with my Wordpress Installations on a couple of my website.
The first problem is that uploading pictures works but when if I add the image to a post for example, it adds it but shows a broken image thumbnail. When I try to access the image though it throws a 403 error. Tried changing the permissions of my uploads directory to 755. Didn't work though.
You can visit this link to get an idea of what's happening.
No thumbnails are showing up on the admin panel. Normally, in the theme installation window, there's a thumbnail on every theme that shows what the theme looks like, in my installation there's nothing like that. It just show blank thumbnails.
I've uploaded an image showing the thumbnail error here.
At first I thought something was wrong with my Wordpress Installation, but after reinstalling it a couple times, I can see that it's something else. Your help would be greatly appreciated.
Use This only permission issue, use 666 for upload folder then images is working well. check this https://codex.wordpress.org/images/e/eb/podz_filezilla_13.gif
If permissions didn't fix it then try this:
1/ Double-check that your PHP configuration is up to date with the latest WordPress version. I made the mistake cause I was previously working on Magento 2 and forgot to switch from PHP 7.2 to 7.4.
2/ Try basic approach deactivate all plugins and see if one is clashing. Do the same with your them or try a native theme TwentyThirteen instead.
3/ Install "Regenerate All Thumbnails" go-to tools and force thumbnails regeneration for the entire library

The whole wordpress website got RESET

My wordpress blog was working perfectly fine, until one day when suddenly my blog got down. All I could see was a blank white page. I still don't know the reason.
But initially, I was able to figure out the Debug messages, which were some compatibility issues between prototype of function Walker() and some theme function extending Walker(). So, I somehow managed to resolve those issues, by changing the theme function prototype.
But still, I could only view a blank page without any error. Then, I went through my child theme files and I found that there was some PHP code written to upload image file in child "style.css". Fortunately, I had backup of my Blog so I restored my child style.css.
After so many efforts, I still couldn't restore my complete Blog.
Although, All the posts and everything is there in DB, but I can't see any post on my Blog and Admin panel. It seems that my created categories are no longer there in Admin panel, when I restored theme.
Can anyone please help me to find out...
Why it happened and How my blog got reset ?
How can I restore my blog and reflect all my posts from DB to Admin-panel & Blog ?
It looks like somebody hacked you up. And, edited some files on your server.
Wordpress, actually doesn't offer any backup features. But, most of the web hosting services have a usual backup option. So, you might consider that.
Or, if your Wordpress database is right in place, as before, then you the possible error is that your Wordpress core files are corrupted or edited by anyone. So, you might consider, deleting your Wordpress and reinstalling it, (without deleting your databases). This would not affect your blog at all, because all Wordpress information is stored in the databases. But, remember to backup the files of wp-content folder and copy them to your new installation.

Resources