Question

Wordpress can't generate thumbnails

  • Posted on February 15, 2015
  • EdaxAsked by Edax

Hi,

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!


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This comment has been deleted

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?

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!