WP FileSystem API help

If WordPress FileSystem API is unable to read or write files, then the server configuration is not correct. This could be due to file ownership, permissions or the method that is used.

Use direct FileSystem method

Using direct method for handling filesystem tasks usually solves the problem.

Edit your wp-config.php file and add this code, if it doesn’t already exist:

define('FS_METHOD', 'direct');
Bitnami based setups
Google Cloud, Azure, AWS

For Bitnami based WordPress installations you may need to re-set the file permissions by accessing the terminal via SSH.

If your installation is not using default settings the user and group (bitnami:daemon) or path to wp-content may be different.
Make note of the previous permissions by using the ls -la command in case you wish to restore them.
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs/wp-content
sudo chmod -R g+w /opt/bitnami/apps/wordpress/htdocs/wp-content
Pantheon hosting

With Pantheon hosting people typically experience the issue only when switching to Git mode. Adding this to wp-config.php should also solve it.

define('FS_METHOD', 'direct');
MicroSoft Azure

With MicroSoft Azure Bitnami instance the FS_METHOD is already defined in wp-config.php, but the loading order for it seems to be switched. Changing the line from wp-config.php to this, and also adding it to your child theme’s functions.php can fix the issue:

if(!defined('FS_METHOD')) {
	define('FS_METHOD', 'direct');