WordPress throws error on the website upon posting an article or page or uploading an image. "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"
The problem is WordPress is having limited permission for making any changes in the wordpress installed directory or Apache|Nginx wordpress document root.
In order to resolve this, provide write permission or ownership to the webserver user i.e. apache or nginx or any other user which runs the webserver process or service.
- For example wordpress runs on a Apache webserver
- WordPress has been installed on /var/www/websites/example.com directory
- Apache is the user runs webserver process or service
Execute the following command to set appropriate ownership to apache user and group to the wordpress installed directory.
# chown -R apache:apache /var/www/websites/example.com