在wp-config.php裡透過下列函式指定儲存位置
1
|
define( 'WP_TEMP_DIR' , '/path/to/temp/folder/' ); |
設定好暫存位置後,記得給該資料夾777的權限。
以下是FTP相關的設定常數
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
|
// 這基本上不用加,有問題的時候改成"ftpsockets" define( 'FS_METHOD' , 'ftpext' ); // 以下三個常數用在chroot的FTP環境,平常也不需要加 define( 'FTP_BASE' , '/path/to/wordpress/' ); define( 'FTP_CONTENT_DIR' , '/path/to/wordpress/wp-content/' ); define( 'FTP_PLUGIN_DIR ' , '/path/to/wordpress/wp-content/plugins/' ); // 帳號密碼,但密碼不建議設定 define( 'FTP_USER' , 'username' ); define( 'FTP_PASS' , 'password' ); // 主機位置和SSL設定 define( 'FTP_HOST' , 'ftp.example.org' ); define( 'FTP_SSL' , false); |