Wordpress can't generate thumbnails

Posted February 15, 2015 7.6k views


I’m having issues using images in my WordPress installation - it appears that WordPress can’t generate the appropriate thumbnail sizes for some reason. I believe this might be a permissions issue.

I’ve tried doing this on my local repository (same website, just locally hosted on my machine) and it worked so it must be a server problem.

I’m running a LEMP stack and I installed WP myself (didn’t use the guides, I have it in it’s own directory as I’m hosting multiple sites on my droplet).

I’ve tried chmodding the wp-uploads folder to 777 and although WP can upload the images, it can’t seem to modify them (such as to create thumbnails). The Regenerate Thumbnails plugin claims success when running it however no new images appear in the file system.

Here’s my main virtual host file in case it might be needed (at the moment the website is running off of a subfolder of my IP address, so I don’t have it’s own virtual host configured yet). Maybe it’s unable to run the proper php scripts needed to manipulate files?

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /var/www;
    index index.php index.html index.htm;

    server_name <MY_IP_ADDRESS>;

    location / {
        try_files $uri $uri/ =404;

     location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;

Any help would be appreciated. Thank you!

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.

Submit an Answer
3 answers

Update: I solved the issue - checked out the guide for installing WordPress and realized that I missed an important step (installing php5-gd and libssh2-php). Thanks though!

I’m running into this same problem with the preinstalled Wordpress on 14.0.4 application. Supposedly that should have all of the dependencies installed from the beginning. Do I need to add some more packages to get WordPress to generate the correct image sizes?

  • I am not an expert and as I said in my update I fixed the issue by installing missing packages - if I were you I would try to go through the installation guide on DO and try re-installing all the prerequisites just in case. Maybe the pre-installation skipped over something? Give it a shot.