Unable to install Plugins or Themes

Hi all, I am a newbie. I’m facing an issue that cannot install plugins and themes from FTP.
I am installing my WordPress from Docker.

I tried to provide permission for the folder wp-content is 755 and add owner www-data

drwxr-xr-x+ 4 www-data www-data 4096 Apr 30 02:58 wp-content

I tried to add define('FS_METHOD','direct'); to wp-config.php but got the message Installation failed: Could not create directory.

I also tried to add FTP server but same issue

define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/Docker/wordpress/data/html/');
define('FTP_CONTENT_DIR', '/Docker/wordpress/data/html/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
define('FTP_USER', 'pi');
define('FTP_PASS', '********');
define('FTP_HOST', '');
define('FTP_SSL', false);

Pls help me to resolve this issue. Thank you in advance

Source link