Punya saya masih Missing a Temporary Folder, sudah saya terapkan di atas, saya juga pakai php.ini, saya restore ulang, saya ganti baru semua, tetap Missing a Temporary Folder, kenapa? Apa ada penyebab lain, awalnya baik baik saja.
This is a very short instructable about how to resolve the Missing Temporary Folder issue you often get in Wordpress. There are many posts on the Web which propose changing the wp-config.php file. However, I tried this and it didn't work. I was able to resolve it by editing my php.ini file which I will describe below.
Anyway, one of the images above shows the missing temporary folder error message that you receive when trying to adding new content in Wordpress, say an image or whatever.
After I resolved this, I found that I couldn't crop and save images. I will describe also how I resolved this.
Before you tackle this, ideally you should have command line interface (CLI) access to the Wordpress server and a reasonable knowledge of Linux. You can also do this in cpanel because it involves simply editing a file , i.e. php.ini. My server is a Debian 9 VPS and I am using Putty terminal emulator to access it from my laptop.
The steps
1. Create a new temporary folder in the WordPress content directory (e.g. cd /var/www/html/wordpress/wp-content) mkdir temp and ensure it has 755 permissions and owned by www-data.
2. Find php.ini on your server. Make sure you use the correct version if you have more than one.
You can see that I still have other versions of php.ini but I need the latest one for php 7.2
3. Open your php.ini file (say using Nano as your editor - see insert below) and find and change the upload_tmp_dir directive to the temp folder you created as shown below. Php.ini is a large file so you will have to use Ctrl/W in Nano to search for it. It is uncommented by default. Change it as shown below then restart Apache (systemctl restart apache2), that's it. This should resolve the issue. Lastly, if you can can't crop and save images, install the PHP GD library sudo apt-get install php7.2-gd and restart Apache.
Active5 months ago
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
I also tried to change wp-config file and added this
Also tried with full path . like
Nothing helped me . any help will be appreciated .Thanks
Manoj KumarManoj Kumar3,39844 gold badges1919 silver badges4444 bronze badges
6 Answers
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:
3.) edit php.ini with your text editor and set the temporary folder (you must switch to root user)
Remeber to remove preceding “;”
4.) save the file (in vim type :wq an press enter) and restart xampp using this command
I hope this will remove error if everything went fine.
Deep KakkarDeep Kakkar4,00011 gold badge1919 silver badges5050 bronze badges
Problem : WordPress is giving error on image upload : 'image.jpg' has failed to upload due to an error 'Missing a temporary folder.'
If you are receiving this error please follow these simple instructions below:
- Create a
'tmp'
folder in your WordPress root directory with777
permissions. This can be done by your FTP program. - Also create a
'php.ini'
file in same location. - Add the following in php.ini file:
upload_max_filesize = 16M
upload_tmp_dir = on
upload_tmp_dir = /home/username/public_html/wordpressDir/tmp
Please make sure to replace username with your hosting username, and wordpressDir with the directory name of your WordPress install.If you have installed WordPress on your homepage then the path will be like: upload_tmp_dir = /home/username/public_html/tmp
- Copy the same php.ini file to your wp_admin folder.
That's it.
Vasim ShaikhVasim Shaikh3,51411 gold badge1313 silver badges4040 bronze badges
My server is a shared one powerd by plesk. I just changed the PHP vesion from 7.something to 5.something, and the problem was solved! I can upload images to the wordpress media galery
Ceci MoraCeci Mora
VikashVikash1,98422 gold badges1313 silver badges2626 bronze badges
This error can happen if you are using IIS server and a fastCGI module with Thread-safe version of Php. As the Php download page states:
IISIf you are using PHP as FastCGI with IIS you should use the Non-Thread Safe (NTS) versions of PHP.
Hope this helps someone.
UrošUroš
Add From Server plugin saved my time.it's easy to use, just upload your image through ftp and use Add from sever plugin to import to your Media Library.
AkoraAkora