Cambi8989
Cambi8989

Reputation: 83

How to fix 'Some files are not writable by WordPress' error, website cannot be changed by admin

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

Upvotes: 8

Views: 16431

Answers (4)

Sibeesh Venu
Sibeesh Venu

Reputation: 21779

I was getting the same error "Some files are not writable by WordPress: wp-load.php" recently as I moved to a different host provider. The error was shown in the Site Health window from WordPress.

enter image description here

To fix this, all you have to do is to change the permission of the file(s). You can do this easily by using the tool called FileZilla. I use this tool for all my FTP actions.

Connect to your server and right-click on the file and select File permissions.

enter image description here

And finally, change the permission to 0644.

enter image description here

Upvotes: 0

chiddidilikahrn
chiddidilikahrn

Reputation: 141

My issue was Wordpress somehow wanted to use "apache" as the user. Changing the ownership from nginx:nginx (which is what runs my web daemon) to apache:nginx worked.

I recommend trying this on ONE file and confirming with the "site health" tool to make sure it is YOUR problem before doing a global change!

chown apache:nginx ./*.php

Upvotes: 2

Dimitrios Pantazis
Dimitrios Pantazis

Reputation: 454

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!

Upvotes: 16

Mohamed Aldanaf
Mohamed Aldanaf

Reputation: 63

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 {} \;

Upvotes: 4

Related Questions