I'm setting up a new website. most files are not editable by WordPress.
I am using a virtual machine on google cloud console. It's Ubuntu 18.04 LTS LAMP stack. I have tried editing permissions of the files through both Filezilla and the ssh prompt on gcloud. like it describes here. I think i have a different problem.
I am brand new and just learning so I'm sorry if the answer is obvious. I found that if I go in and manually set permissions for files to 775 in the SSH WordPress is able to edit some files. But i cannot edit permissions of some files even after i am in root
sudo su
Apart from permissions you have to change the Owner of the Files to the web server user ( most cases, especially those using apache www-data ) .
The command to do that is the below
$ sudo chown -R www-data:www-data /path/to/wordpress/
the usual path of a website on a ubuntu server is /var/www/domain.com/ but of course that depends !
Wish you the best!
change all files and folders permission as follow:
enter your public_html folder and execute this two commands
find . -type d -exec chmod 0755 {} \;
find . -type f -exec chmod 0644 {} \;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With