dangcreations
dangcreations

Reputation: 33

Optimize Wordpress image upload, slow and only 1 at a time on Dedicated

So I have been at this for weeks with different configurations and I usually am able to figure out by searching but I am not as savvy with server configuration, so I need to ask. Hopefully someone can point me in the right direction.

I have a dedicated server with 5 different WordPress installation, EVERYTHING is blazing fast, in terms of site load speed and posting, etc EXCEPT for when I start uploading images using the Wordpress Image upload. ITS SLOW..

When I drag photos over (doesn't matter the size) it takes forever and it seems to be processing one image at a time, unlike when I was on shared hosting, the image upload was a lot faster.. This happens on all my Wordpress installation with different themes and plugins, so I assume this is a server configuration, somewhere.

The process bar would go to 99% for the first image and it sits there for a few minutes, and then goes to the next; also my Admin would stall, so I cannot do anything else on the Admin area until all the images are done uploading. The site doesn't stall and is still functional if I go on a different browser that isn't login as the Admin.

If I go to my process manager, I see that the async-upload.php is running and is only taking up .3% of the CPU and .6% of the memory.

It always finishes but it seems like I am only allowed to have 1 connection or process (sorry, I do not know the correct terms) at a time and then I can request another. Anyone know what server configuration I am missing or have that is causing this? I am on WHM/Cpanel with SSH access, I have tried a few PHP, MySql, and Apache optimizations I found but it hasn't resolved the problem, I am of course doing something wrong with my configuration, anyone can shed some light?

Upvotes: 3

Views: 9895

Answers (1)

O. Jones
O. Jones

Reputation: 108651

Near the end of its image upload operation, WordPress attempts to resize the incoming images to create thumbnails and medium-sized images. To do this it has to load the images, decompressed, into memory.

That can take a lot of RAM. Try increasing the RAM available to your php instance. Look, in php.ini for a stanza like this

; Maximum amount of memory a script may consume
; http://php.net/memory-limit
memory_limit = 32M

and increase it.

You may also have issues with these settings.

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 8M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

Also, take a look in your php_error.log and apache_error.log files and see if you can see any problems. Also, if you're using Google Chrome, open the Javascript console and see if there are any errors showing up.

Upvotes: 2

Related Questions