• Resolved Renan

    (@sysrenan)


    Hello everyone,

    I haven’t been able to figure this out, hopefully someone here can help me.
    I want to know if there’s a way to change the temporary download folder that the update-plugin and update-core uses?
    When I click to update a plugin, I see that WordPress downloads a file into /wp-content/<filename>.tmp

    I’m wondering if I can change this to use another temporary path location.

    The reason for this is that I’m using NFS mount point for the domain root folder, and it would be much faster to have the download temporary folder be: /home/tmp/ which is in the local server’s HD, and is better for me bandwidth wise as well.

    Does anyone know if I can do this without actually changing the core files? Maybe a define on wp-config.php or database somewhere?

    I really appreciate your help. Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Following lines to be added in the config file:

    define(‘WP_TEMP_DIR’, ini_get(‘upload_tmp_dir’));
    putenv(‘TMPDIR=’ . ini_get(‘upload_tmp_dir’));

    and give those files full permission(r-w-e).

    Thread Starter Renan

    (@sysrenan)

    sasmitainfo, thanks for the reply.

    When I try adding the code you mentioned to my wp-config.php, then I try to download a plugin, the plugin fails to download, even if I set the actual “upload_tmp_dir” folder with chmod 777 and the user the webserver is running as, doesn’t work.
    I did try different paths for php-fpm’s upload_tmp_dir path, but none of them worked.

    Any idea?

    Thank you!

    Thread Starter Renan

    (@sysrenan)

    sasmitainfo, it was the open_basedir, I had to include the tmp folder, I overlooked that.

    works good now, thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Any way to change temporary download folders?’ is closed to new replies.