WordPress issues when update/install themes/plugins/wordpress

Hello Buddies,

Recently I came across with some issues with some WordPress sites.  The error is related with the tmp folder. For example
Warning: touch() [function.touch]: Unable to create file /home/user/domains/userdomain.com/public_html/wp-content/uploads/contact-form-7.tmp because No such file or directory in /home/user/domains/userdomain.com/public_html/wp-admin/includes/file.php on line 155

This is because the WordPress is looking for a tmp folder to create a temporary files in it while installing/updating something in the WordPress sites. In earlier versions it was set to use the default /tmp folder under the cPanel user directory.

It seems the latest versions of WordPress does not has those settings. So the following setup should work fine.
1) Add the following line in the wp-config.php file and save it.
define(‘WP_TEMP_DIR’, ‘/home/cpanel_username/public_html/wp-content/tmp/’);
define(‘WP_TEMP_DIR’, ‘/home/cpanel_username/tmp/’);

2) Now create a “tmp” folder (if you are going for first option) under wp-content folder and set permission to 755.
mkdir tmp
chmod 755 tmp

All done. Now try to upgrade/install/update the themes, plugins or WordPress. It should work like a charm unless you ran out of Disk quota.

Have a Great Day Friends!!! 🙂 😉


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s