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

  • Posted November 11, 2013

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?



Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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:

/etc/php5/apache2/php.ini /etc/php5/cgi/php.ini

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:

<IfModule fcgid_module>
FcgidMaxRequestLen 204800000

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

That’s happening because a conflict between user/group permission. <br>All you need to do is to connect via SSH to your Droplet and run this <br> <br>gpasswd -a ftpuser www-data (this adds ftpuser to www-data group) <br>chown www-data:ftpgroup -R your-directory (this gives owner to www-data with ftpgroup) <br> <br>This way both can share the same write permission without colliding each other.

nah… Didn’t work…

@jntslvdrt: <br> <br>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: <br> <br><pre> <br>cd /var/www/html <br>mkdir wp-content/uploads <br>sudo chown -R demo:www-data wp-content/uploads <br></pre> <br> <br>After that, I was able to able to successfully upload images.

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… <br> <br>The strangest thing is that plugins are working as well with 755 permission. :S <br> <br>I already using the very .htacess that Wordpress demands itself when its setting permalinks… <br> <br>I followed this tuto <br> <br>Anybody has any idea of my “problem”?

@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 followed DO tutorial installing Wordpress but I got the same error as semanticfield. <br> <br>My htaccess is working because permalinks are working… and image is not over 2mb it actually has 380kb

How big is the file you’re trying to upload (I couldn’t tell from the video)? If you noticed under the <code>Select File</code> button, you currently have a 2 MB limit on file uploads. <br> <br>When you installed WordPress on DigitalOcean, did you follow a particular guide? If so, which one?