Could not install or update the theme, plugin in WordPress

Sometimes, you get this error 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.

That means you are a user who has no permission to write the site source code. To update this you can use this command in the terminal if you want to writable whole site.

chown -Rf www-data.www-data /var/www/html/your-site-folder

You also can specify the themes or plugins which you want to writable.

chown -Rf www-data.www-data /var/www/html/your-site-folder/wp-content/themes or plugins

Leave a comment