How to get rid of ‘Temporary Folder Missing’ error while uploading media in WordPress

1) Locate wp-config.php file in the root of your wordpress site.

2) Add following code after / That’s all, stop editing! Happy blogging. /:

1 define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');

3) Create a new folder temp in wp-content folder.

4) Gracefull restart

If still any issues persist try disabling/enabling the cagefs user.