Need help: I can't add media (images etc) to my site through Wordpress site dashboard

November 11, 2013 4.1k views
Every time I do that, it cause the site to go down just like in this video I recorded: The problem is after about 2 minutes, the site is up again, but you can't upload media to your site, because that would cause it to go down again. Can someone take a look at it and tell me how to fix it? Thanks.
8 Answers

or all those who experience the http error problem, I would like to share how I figured it out. I realized that I was actually able to upload images with small size - 1kb, 30kb, etc. Larger files like 300 kb or 2 mb gave me an HTTP error in the admin media section.

So, there are several things that I did, as following:

Increased max_execution_time = from default to 5000;
Increased upload_maxfile_size = from default to 200M;
I have applied the two steps above in these files:


After that, ssh login via root account to my droplet and restarted apache via:

service apache2 restart

After that I saw that in my wordpress admin section the limits have been rised up. Unfotunately, I couldn't upload larger images - 1mb in size, for example.

Then, I found this file:

/etc/apache2/mods-available/fcgid.load and saw that it contained this line:

LoadModule fcgid_module /usr/lib/apache2/modules/

I have changed the content of this file to:
LoadModule fcgid_module /usr/lib/apache2/modules/
<IfModule fcgid_module>
FcgidMaxRequestLen 204800000

Restarted apache as written above.
Now, I was able to upload larger files.

  • I tried your approach but can't see an Apache module called fcgid_module. (No fcgid.load either).

    I see one that is just called cgid_module. (There is no 'f' at the beginning.) I am running Apache 2.4.12 on Ubuntu 14.04 LTS.



How big is the file you're trying to upload (I couldn't tell from the video)? If you noticed under the Select File button, you currently have a 2 MB limit on file uploads.

When you installed WordPress on DigitalOcean, did you follow a particular guide? If so, which one?
I followed DO tutorial installing Wordpress but I got the same error as semanticfield.

My htaccess is working because permalinks are working... and image is not over 2mb it actually has 380kb
@jntslvdrt: Which tutorial did you follow? Try uploading a tiny image, something as small as possible, just to rule it out. If that works, you might just need to increase the "max_execution_time" setting in /etc/php5/cgi/php.ini
I've tried with 0.3kb. I think it's about apache conf (allow override etc). Now I'm able to upload images BUT just because I gave 777 permissions... but I know it's very dangerous... Already set back to 755...

The strangest thing is that plugins are working as well with 755 permission. :S

I already using the very .htacess that Wordpress demands itself when its setting permalinks...

I followed this tuto

Anybody has any idea of my "problem"?
by Justin Ellingwood
WordPress is the most popular content management system on the web. In this guide, we'll demonstrate how to install and configure it on an Ubuntu 14.04 server.

I just ran through a quick Wordpress install to see if I had the same problem using that tutorial, and I also wasn't able to upload images. I needed to do:

cd /var/www/html
mkdir wp-content/uploads
sudo chown -R demo:www-data wp-content/uploads

After that, I was able to able to successfully upload images.
That's happening because a conflict between user/group permission.
All you need to do is to connect via SSH to your Droplet and run this

gpasswd -a ftpuser www-data (this adds ftpuser to www-data group)
chown www-data:ftpgroup -R your-directory (this gives owner to www-data with ftpgroup)

This way both can share the same write permission without colliding each other.
Have another answer? Share your knowledge.