WordPress error: To perform requested action, wordpress needs access to webserver

The error message displayed is:

“Connection Information: 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.”

This occurs due to permission issue. Check ownership of files.

The reason is that certain files in your wordpress installation directory cannot be written to, as they’re not owned by the user running the apache process.

To find out the user runing apache, put the following code in a file testeuser.php and run it:

<!--?php echo(exec("<span class="hiddenSpellError" pre=""-->whoami")); ?&gt;

For me, it outputs:

rt6004

So I have to change ownership of my htdocs folder:

[[email protected]] ~/domains/htdocs #chown -R rt6004.www-data *

Here, rt6004 is the user and www-data is the group.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.