Reputation: 652
I thought I will solve that myself, but after few hours I don't know what to do else.
I have WP 4.9.8 project (skeleton) without any plugin and theme. I am trying to instal some plugins and upload images, but it still says
Missing a temporary folder
I already set WP_TEMP_DIR by many ways, but unsuccessfully. When I call:
var_dump(get_temp_dir());
in current theme functions.php file it gives me concrete folder. I already changed mode to 777. But nothing changed. When I put:
file_put_contents(get_temp_dir() . 'test.txt', 'testing');
to functions.php it successfully write to test.txt file.
I also tried to restart PHP(5.6) and Nginx...
Does anyone have any idea?
Upvotes: 1
Views: 477
Reputation: 758
Check directory owner.
the directory must owned by Nginx.
Try this code, change the path to your temp path
chown www-data:www-data /path/to/wp-temp-direcotry/ -R
Upvotes: 1