Jump to content

WordPress Seems to have lost the ability to write to files?


JpTiger

Recommended Posts

Hi there, long time user running three WordPress sites on my account. I've started getting this problem where WordPress no longer seems to have the permissions to write to files anymore. When I go in the admin area to update plugins, I get the following message:

 

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

 

I could set up FTP as a workaround, but if there's any way to restore normal abilities to the app, that would be great. I'm also kind of wondering why and how WP lost the ability to do that on its own - I haven't changed anything on the site in some time.

 

Googling this leads to possible solutions, but only if you have command line access to the server, I think. Here's an example: https://www.chriscourses.com/blog/how-to-fix-the-wordpress-needs-access-to-your-web-server-error

 

Anything I can do to fix this? Thank you!

Edited by JpTiger
Link to comment
Share on other sites

You don't need command line to change permissions. You can do it through cpanel file manager, or through sftp. I'm not familiar with wordpress so I have no idea what the permissions are supposed to be, but generally 7 = read,write,execute - 6 = read,write - 5 = read,execute - 4 = read, and so on. In order for php files to not give a 500 error they need to be 644. Directories usually should be 755, but if you want a script to be able to create a new file inside the directory you might need to make it 777. Perhaps google what wordpress permissions should be and then compare it to what you have.

Link to comment
Share on other sites

  • 5 weeks later...

I guess I was wrong about the cause being the permissions then. I went into cpanl File Manager and set the permissions to the folder with the WordPress installations to the recommended 755 (from 750) but I'm still getting the same issues with updating plugins through WP interface.

 

The link I had in OP (https://www.chriscou...eb-server-error) references problems with ownership settings as well. Is that something I can manage on my end?

 

EDIT: Did some more digging and realized that I'd used up my 1GB quota. I'd bet that has something to do with this. I downloaded some large backups and deleted them from the server which should have freed up some space, but that doesn't yet seem to be reflected in my disk usage stats. Issue remains...

Edited by JpTiger
Link to comment
Share on other sites

You can't nor should you need to change ownership of any files or directories. Everything in your home directory and public_html should be owned by you already.

 

I don't know if it will help, but I found this https://codex.wordpress.org/Changing_File_Permissions

 

I'm sure you've heard us ranting and raving about how horrible wordpress is, and we've come really close to banning its use on our servers. Maybe this is a sign that you should switch software?  :rolleyes:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...