我正在尝试让WordPress使用wp-content的临时目录,可能是/ tmp目录,我假设一旦升级或插件安装完成,WordPress将替换/ var / www / html根文件夹中的实际wp内容/ wp-contents,我在wp-config.php中使用了以下设置 .
define('WP_TEMP_DIR', dirname(__FILE__) . '/tmp');
但是,一旦我尝试升级它,检查/ var / www / html / tmp /目录,说
Download failed.: Destination directory for file streaming does not exist or is not writable.
我需要使用/ tmp not / var / www / html / tmp
将给/ tmp提供必要的权限和所有权
编辑:AWS EFS存储上的WordPress存在自动升级问题,因此使用WP_CONTENT_DIR或WP_UPGRADE_DIR设置对我不起作用 .