WordPress ask to FTP credentials to install plugins

After configuring WordPress in a VPS it is common to have a permission error in which FTP credentials are requested to install plugins.

Please enter your ftp credentials

What is a solution to solve the FTP credentials problem?

On a web server with Nginx this is easily solved by adding the following line in your wp-config.php file:

define('FS_METHOD', 'direct'); 

If you use Ubuntu to fix the permissions on the WordPress installation folder run the following command:

#change “root_directory_wordpress” with a name of the folder that WordPress was installed.

$ sudo chown -R www-data:www-data 

With this solution probably you will solve the problem if you can know more about permission on WordPress folders and files, You can click here and read this article on the WordPress Codex that talks about this.

If you know something more that I don’t mention on this post, please leave in comments and I’ll add in this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.