I have a wordpress installed . Host provider is 1&1. Now if i tried to upload media file it show me the error missing a temporary folder . I also define a path fpr temp directory . I refer this link link . And created the php.ini file in the home directory . My php.ini file content is
upload_max_filesize = 16M
upload_tmp_dir = on
upload_tmp_dir = /epigram.co.uk/tmp
I also tried to change wp-config file and added this
define('WP_TEMP_DIR','/epigram.co.uk/tmp');
Also tried with full path . like
define('WP_TEMP_DIR',$_SERVER['DOCUMENT_ROOT'].'/tmp');
Nothing helped me . any help will be appreciated .Thanks
Edit your php.ini
file which is located in etc/
folder, remove comment from the line upload_tmp_dir
(by deleting the semi-colon “;”) and pointing the variable to a folder using an absolute path.
1.) open a terminal
2.) create a temporary folder for all apache tasks in your user folder and grant all right to all users:
mkdir wwwtmp && chmod 0777 wwwtmp
3.) edit php.ini with your text editor and set the temporary folder (you must switch to root user)
su
vim /opt/lampp/etc/php.ini
upload_tmp_dir = /home/my_user/wwwtmp/
Remeber to remove preceding “;”
4.) save the file (in vim type :wq an press enter) and restart xampp using this command
/opt/lampp/./lampp restart
I hope this will remove error if everything went fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With