Upload media / Select files button not working (Wordpress / Ubuntu 14.04)

Help needed!

I am having a hard time understanding why is the “select files” on media uploads view not working on a couple of my wordpress (version : 4.7.3 ) sites hosted on my Ubuntu 14.04 droplet. It seems that the issue is only with Chrome though. Whenever I click on “select files” button in Media>Library>Add New, the pop up window doesn’t appear.

I have already tested changing the themes, and I also verified that its not a wordpress update bug, since I have another wordpress site hosted in the same droplet, same wordpress version and that one is working fine.

It seems weird to me that the issue is only present in Chrome, makes me think some file permissions/security issue ? I honestly have no idea

I really need your help with this. Whoever is having the same issue please let me know

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.

I wrote about the problem and a temp fix in my blog: The upload is not working in WordPress media uploader


If the issue persists in just one browser, I’d be less likely to think it’s a permissions issue – instead, I’d be on the side saying it’s an issue with WordPress or one of the plugins you’ve installed. Still, it never hurts to check file and directory permissions just to be sure.

Login to the CLI as your root or sudo user and navigate to the directory where the site is located. From there, you can use ls -al to view the user:group that currently owns each file and directory.

When it comes to stock installations of Apache using mod_php (which is what most use), the files and directories need to be owned by the same user that Apache is running as. In most cases, that’s the www-data user unless you’ve changed it or it was previously set to something else. If you have a different setup, use the user you know works.

From there, you should be able to simply use chown to recursively change the user:group owner. If the current file or directory is already owned by that user, nothing will change. If a file or directory isn’t owned by that user:group, then it will be after the command is ran.

So if WordPress is installed to /home/user/public/, we can run:

chown -R www-data:www-data /home/user/public/*