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).
![](https://i0.wp.com/images.pexels.com/photos/728824/pexels-photo-728824.jpeg?w=1200&ssl=1)
If when trying to upload or install a plugin or theme the following appears:
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2024/01/imagen-41.png?resize=599%2C762&ssl=1)
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:
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2024/01/imagen-42.png?resize=207%2C143&ssl=1)
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/07/cropped-light_logo-5.png?resize=100%2C100&ssl=1)