If your get the error while updating your wordpress installation or plugins: “To perform the requested action, WordPress needs to access your web server” and want to avoid using FTP method read below.
You can fix this issue by following steps.
At first check what user is running the wordpress. Create file named check.php and upload it to the root directory (where index.php is located). In the file check.php paste this code:
<?php echo(exec(“whoami”)); ?>
Then view this file in your browser. If it shows for example “testuser” and in the ftp manager you see all files are owned by ” apache” then you should change the permissions of all wordpress files to “testuser”
There are many ways to change permission, one way is to use Webmin File Manager (if you control the server), another is to use any ftp program or control panel provided by your hosting. Below is a screenshot of how to change Wordress file permissions in Webmin.
The problem is when you change file and folders ownership that way all permissions are duplicated and files inherit 755 permission from folder settings.
Correct wordpress files permissions are 644 for all files and 755 for all folders (few exceptions might be with uploads folder)
You probably don’t think we have to change all file permissions from 755 to 644 by hand? :)
Of course not. Head to the Command shell to execute few lines of code: Read the rest of this entry »