My client’s copywriter contacted me as they were unable to upload images for their posts in their WordPress website. After trying a few suggestions to resolve this, I still couldn’t find the cause of the error message. Here’s how it played out:
Run out of web server space?
My immediate thought was that they had run out of disk space on the file server. A quick check in the hosting account confirmed they had heaps of space, so on we go.
A plugin issue?
A fairly standard approach to solving mysterious issues in WordPress is to disable all plugins and see if the issue persists. Unfortunately, on this occasion, the problem continued with all plugins disabled.
When you disable all plugins, some/much of the website’s functionality is also disabled so it is something you need to do quickly and probably not at the peak activity time for the website. In business websites, this is best done after hours and certainly not at typical peak times 10am Monday to Friday.
Steven Stern suggests installing the Health Check plugin then using its troubleshooting capability to disable plugins and themes without impacting visitors. Nice work, Steve. Refer: WordPress Support Forum
Other responses from this thread suggested updating PHP, setting file permissions etc
When all else fails…
As I’d reached the end of my technical abilities, and need to get this fixed quickly I contacted Siteground on their support chat, and within seconds their support specialist identified that php.ini had been recently edited to block file uploads:
set file_uploads=no
After editing php.ini the file uploads started working again.
Its fixed, but how did it happen?
Its one thing to identify and rectify the cause, but a completely other activity is to find out why it happened. The last thing I need is an unstable website that has a mysteriously re-occuring issue.
As it turns out a security plugin had been installed by another agency not appreciating the impact on other functionality within the website. All good intentions there, but when the security lockdown is so tight that the client isn’t allowed image uploads, then its way over the top!
Mental note: Reduce that agencies access level so they can’t break the site going forward!
An online marketer with deep experience in Sales & Marketing as well as technical skills accumulated over the many years of working in this industry. He has been knee-deep in websites and online marketing since the mid 80's.
Peter is a lateral thinker who sees solutions where many don't.
Website Concierge is a reincarnate of Succinct Ideas, providing quality website support and online marketing for small businesses.
If you found something in my site useful, I'd really appreciate if you could link to the page and maybe Google will help other people who need the same info find the page as well ;)
This also had me going for a while. Update from 7.4 to 8.x and could not upload. Checked the php.ini,user.ini, .htaccess. Nada.
Had a bit of a brain snap and checked the root php.ini for the 8.x php variants in WHM and yes, file_uploads was disabled there
Not happy that I have to enable a global file_uploads for all sites but it is working now
I think the bug is in WHM rather than CPanel
Thanks a lot, man! After looking for a solution for 7 days, I got you. You are helpful.