Images no longer served on WP site


I updated plugins two days ago and ever since the images on the WP multisite no longer show. One was a security plugin and the other nginx helper plugin. The images now do not show in a browser.

SSH shows the files are present. I can go into the WP admin panel and click on edit the image and it’ll show but once saved then it goes back to ‘broken image.’

I’m sure this is a permissions issue because I tried to use Filezilla and change permissions for some files and an error was returned that the account didn’t have permission - odd - since it always did …

How can I chmod directories to the correct permissions, file uploads to the correct permissions, etc?

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.

Ah, I haven’t used that plugin before, but I see it looks like it adds redirects, so that could be it. What’s your nginx conf looking like?

Hi, <br> <br>Thank you for answering my question but I’m finding out that the permissions are in fact correct. Instead, file paths are wrong. I never changed them but something changed them… maybe the nginx helper plugin. <br> <br>The image is called correctly here: <br> <br> <br> <br>But WordPress is calling it here: <br> <br> <br> <br>So - did nginx conf get changed by the WP nginx helper plugin? How do I get this working so the images show? I have deleted the nginx helper plugin but still cannot get images to load properly.

Make sure the owner/group of the folders is www-data. Generally speaking, all sites should have that as the owner/group, though it of course depends on your set up. <br> <br># sudo chown -R www-data:www-data /var/www/yourwordpress-install <br> <br>That will make everything in your folder have the www-data user and group set to them. If you need your permissions updated as well, you can add yourself to the www-data group. <br> <br># sudo useradd -g www-data yourusername <br> <br>That should allow you to change the file permissions using FileZilla. But if you want to do that using the command line, it’ll be something like <br> <br># sudo chmod 0755 /var/www/yourwordpress-install/wp-content/uploads <br> <br> <br>Change the directories in the commands to reflect your folder structure.