WordPress file permissions on VPS

If you are runing wordpress on any VPS like DigitalOcean. Having site folder with incorrect set of permissions could show following message upon updating wordpress or plugin.

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 issue can be resolve by running following command:

sudo chown -Rf www-data:www-data /var/www/wordpress

Author: Danyal
I'm a skilled programmer specializing in Vue.js/Nuxt.js for front-end development and PHP Laravel for back-end solutions. I have a strong focus on API design and development, complemented by experience in web server setup and maintenance. My versatile expertise ensures seamless creation and maintenance of web applications, covering everything from intuitive user interfaces to robust server-side functionality. Passionate about coding and driven by a lifelong learning mindset, I invite you to explore more at danyal.dk.