Solved: Destination directory for file streaming does not exist or is not writable – WordPress

In this little post we will quickly cover how to fix the issue “Destination directory for file streaming does not exist or is not writable” which you might get if you’re using WordPress and/or Bitnami. You might get this regardless of the host you use for your WordPress website.

When do you get this error?

When trying to upgrade your the version of your WordPress or when trying to upgrade the version of a specific plugin you might have installed.

Why do you get this error?

Because of permissions. Basically, WordPress doesn’t have the correct permissions to perform specific actions, in this case creating a temporary folder that will be used throughout the upgrade process.

How to fix this error?

his is a read-write permission error. Fix this by changing the “wp-content” folder’s permissions to 755.

If this doesn’t work checked the wp-config.php file and if it’s not already defined, add

define('WP_TEMP_DIR', ABSPATH . 'wp-content/');

You have two possible options:

Option 1 – Ensure that the correct permissions are set to the ‘wp-content’ folder.

This folder should have 755 for its permissions. You may set these through FTP/Admin Panel or using the command line. Read more on how to use chmod to set permissions here.

Example: sudo chmod 755 /wp-content/

NOTE: Depending on your hosting provider, you might not have ssh access to your instance. If that’s the case get in touch with your hosts provider to update the permissions for you.

Option 2 – Update wp-config.php

Edit the wp-config.php of your website and do the following:

  • Inspect the code and check if WP_TEMP_DIR is always defined somewhere in the code
  • IF it is, then update it to define('WP_TEMP_DIR', '/home/path_to/your_site/wp-content/');
  • IF it doesn’t exist, then just add define('WP_TEMP_DIR', '/home/path_to/your_site/wp-content/'); to a new line after define(‘DB_NAME’, ‘…’) or a similar place

Go back to your WordPress Admin page and refresh it, then click the update button again and check that it all works correctly.

Wordpress - Example of plugins updating successfully and error being fixed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.