Plugins in WordPress are like fuel to engine.WordPress one of the most popular web building tool gives greater flexibility, expansibility and invincibility when plugins are easy to download and update.Updated plugins provide bug fixes and new add-on features to extend some old features,so it’s quite obvious to update.Keeping that in mind,recently I was installing plugin but suddenly some sort php error occurred,tried again but same result.Frustrated and hopeless searching around web provide me a lot of suggestions.After testing on my website,I finally managed to fix the issue.
Have a look on generated error and follow given steps :
According to error generated,it’s clear that touch() function is not able to create /tmp/plugin.tmp because no such directory is available.Nothing special,what we need to do is instruct php and provide it with some temp folder for installation of plugins.
- Log in to cpanel.
- Open public_html folder.
- Search wp-config.php file.
- Open wp-config.php file.
ADD Below code :
define(‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/uploads’);
This will work for sure.
define(‘WP_TEMP_DIR’, ABSPATH . ‘tmp’);
And create tmp folder in Public_html folder.
Both of these methods are fully tested and verified by me.They were working like Charm in my case.After that I updated WordPress and other plugins too,and that was a clean sweep no error at all.