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.
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');
For Bitnami based WordPress installations you may need to re-set the file permissions by accessing the terminal via SSH.
bitnami:daemon
) or path to wp-content
may be different.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
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');
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');
}