Today we are going to learn with a few simple steps how we can disable FTP upload to WordPress and enable direct file upload (plugins and themes).
If when trying to upload or install a plugin or theme the following appears:
It is because we have FTP file upload activated.
To deactivate it and enable direct upload we have to edit our wp-config.php file
And we add:
define('FS_METHOD', 'direct');
With this, it will upload the files directly to the WordPress directory.
And it will allow us to install directly: