Can't update plugins in wordpress

Keywords: WordPress - AWS - Technical issue - Permissions
bnsupport ID: ed9747f3-61a4-87b6-be98-d9345cd1e8b2
Description:
Hi:

I know this question has been answered several times before, I already reviewed previous answers and changed permissions in the Wordpress folder as detailed on this tutorial:

https://docs.bitnami.com/aws/apps/wordpress-multisite/administration/understand-file-permissions/

However, after reviewing this, I still have the following error appear when trying to update any plugin:

“Update Failed: Download failed. Destination directory for file streaming does not exist or is not writable.”

I ran the Bitnami Support tool and came back with the following code:

ed9747f3-61a4-87b6-be98-d9345cd1e8b2

Any help is very much appreciated.

Thanks.

Hi @dcoburns,

It seems the WP_TEM_DIR setting has been changed to \wp-content\temp. Please note that you need to use forward slashes for paths in Linux. Can you change the path to use forward slashes and restart the application?

Regards,
Michiel

Hi @michiel

Thanks for looking into this.

Updated WP_TEM_DIR using forward slashes but still can’t update plugins or wordpress. Any other ideas?

I received the following error when trying to update wordpress:

Downloading update from https://downloads.wordpress.org/release/wordpress-5.7.1-new-bundled.zip…
Download failed.: Destination directory for file streaming does not exist or is not writable.
Installation Failed

Thanks.

Hi @dcoburns

Updated WP_TEM_DIR using forward slashes but still can’t update plugins or wordpress. Any other ideas?

Have you restarted your application after performing such changes, as suggested?

$ sudo /opt/bitnami/ctlscript.sh restart

If you did, can you please verify the directory exists and has the right permissions? In order to do that, you can follow this guidelines:

  1. Execute the following command to obtain the value of WP_TEM_DIR:
$ cat /opt/bitnami/apps/wordpress/htdocs/wp-config.php | grep WP_TEMP_DIR
define('WP_TEMP_DIR', '/tmp/example');

As you can see, in my case it points to /tmp/example.

  1. Verify the existence and permissions. Notice that you will have to replace /tmp/example with the result from the previous step:
$ sudo ls -la /tmp/example
total 324
drwxrwxr-x  2 bitnami bitnami   4096 Apr 21 09:24 .
drwxrwxrwt 29 root    root    323584 Apr 21 09:24 ..

Could you please execute the aforementioned commands and share their output with us?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

Hi, thanks @michiel and @jcarmona. The problem was the WP_TEM_DIR as both of you mentioned, however it was solved by doing the following:

I had on the wp-config file the following:

define(‘WP_TEMP_DIR’, ‘/wp-content/temp’);

when it should have been the following:

define(‘WP_TEMP_DIR’, dirname(FILE) . ‘/wp-content/temp/’);

Problem solved. Thanks again.