Documentation

Fix – temporary folder not writable

When you try to install or update a plugin, you might encounter the error “Destination directory for file streaming does not exist or is not writable”

This error happens when the folder that WordPress is trying to write to, does not have the right folder permissions.

One solution could be to check the permissions from the wp-content/uploads/ folder, setting to 755 or higher should be enough.

Setting too high permissions for a folder can be a security problem, but too low can cause functionality issues preventing WordPress from running at all.

If this is not possible or you prefer to make a more secure solution, we can set up a custom directory outside the WordPress environment instead.

This requires you to do a few steps:

  1. Log in to your FTP account for the website.
  2. Navigate to somewhere outside the WordPress folder structure
  3. Create a new folder (make sure to set folder permissions to at least 755

Tell WordPress to use that folder instead – you do that by editing your wp-config.php file and add the following line at the bottom of the file.

define('WP_TEMP_DIR', ABSPATH . '/../wptemp/');

In this example we have put the folder “wptemp” outside the root of WordPress, we tell WP to look for the folder one layer down from where it is installed.

 

Tags: , ,

Was this helpful?

Still need help?

If searching the knowledge base does not help you, please contact support.

Fast and easy to use WordPress Security

Instantly protect your website from 600+ million bad IPs

10% OFF

Subscribe to our newsletter

* We do not spam or share your email

Discount on any Security Ninja plan

and get

Hi and welcome back :-)

We won't spam you. Unsubscribe any time.

Wait! Before you go!

Get 10% discount for any WP Security Ninja plan!

 

Subscribe to our newsletter for new releases, discounts and general WordPress Security news. Sprinkled with other interesting stuff :-)