Question
How do I change the PHP upload path when using PHP-FPM?
Answer
- Access the server's command line as the
rootuser via SSH or Terminal in WHM. -
Open the
/var/cpanel/userdata/cpuser/domain.tld.php-fpm.yamlfile in your preferred text editor.Note: "cpuser" and "domain.tld" must be replaced with the cPanel username and the domain to change the upload location.
-
Add the following line to the file on a new line after the
_is_present: 1line.CONFIG_TEXT: php_admin_value_upload_tmp_dir: { name: 'php_admin_value[upload_tmp_dir]', value: "/path/to/new/upload/folder" }
Note:
"/path/to/new/upload/folder"must be replaced with the full path to the new upload folder. - Save the changes and exit the text editor.
-
Rebuild the PHP-FPM configuration.
# /scripts/php_fpm_config --rebuild
Comments
0 comments
Article is closed for comments.