0
votes

I've built a wordpress website on my mamp localhost, and subsequently uploaded it to a web hosting service.

Since I've uploaded it I cannot upload images via the wordpress 'add media' section. I temporarily change the 'uploads' permissions to 777 and it solved the problem.

I know 777 isn't best practise so I changed it back to 755 and the error has reoccurred.

Is this something to do with the admin user and password I originally set up for wordpress on my localhost versus the ftp user which I created and used to upload the site to the web hosting service?

Does the ftp user own the files - therefore stopping the wordpress admin user from uploading files?

Thanks

2
Use 775 if 755 won't work. You do not need to do anything with your wordpress of ftp user. It's related to (i guess) linux user/group.vaso123
Should I set it to 755 for folders only? - or files and folders?Darren Baker
Files should be 644, directories should be 755. This is a owner:group issue, permissions issue. Read more in Hardening WordPress.rnevius
You most likely need to chown -R username:groupname your apache user/group.rnevius
Mevius - Can I do this chown procedure using Filezilla?Darren Baker

2 Answers

0
votes

Files should be 644, directories should be 755. This is an owner:group permissions issue. Read more in Hardening WordPress.

The real issue is an ownership issue. You're going to need to chown -R username:groupname to your Apache user/group, so that WordPress can write to these directories.

0
votes

chown -R username:groupname your apache user/group fixed the problem.