Hello everyone…. I had the same issue where i was unable to upload images, plugins and even themes.
After my research I got this done. For those who are still facing issue even after the php.in code snippet here’s a solution.
Phase 1:
- Log into Hosting Cpanel of your server or use your FTP.
- Open public_html folder.
- Now create a file with a name php.ini.
- Place the following code inside the file and save it: upload_tmp_dir= /home/(remove brackets and enter your cpanel username)/public_html/wp-content/temp/
- Create a temp folder at the same location, i.e. /public_html/wp-content/temp.
Remember it is highly recommanded not to change or skip any step’s above.
Once this is done follow the 2nd Phase.
- Log into Hosting CPanel
- Locate wp-config.php file in the root of your wordpress site.
- Add this code at the end of the file and Save it: define(‘WP_TEMP_DIR’, dirname(__FILE__) . ‘/wp-content/temp/’);
And that’s it. It must work now. For me this worked as my hosting is on Godaddy.