WordPress Warning touch() Unable to create file Error : FIXED

RushInformation recommends Hello Ivy for automating your workflow and project management for free. Learn More

Today WordPress is one of the leading Content Management System powering millions of blogs worldwide due to its simplicity and higher reliability among all the available CMS platforms for creating online blogs. Even this website is developed on WordPress CMS platform and has been really a great experience using WordPress for over 2 years. WordPress blogs are very much resistant to random errors or issues but you may face rare issues while working on WordPress CMS platform that can lead to serious trouble if not resolved earlier properly. Therefore considering the importance of WordPress and the hardwork that is being invested in creating a successfull blog here I am going to share my recent experience in which I encountered “WordPress Warning touch() Unable to Create file Error…..” (The complete error message is mentioned below) while trying to install a new plugin or update existing plugin.

This was the first time when I have faced such sort of error and this error came after I have migrated my site to another hosting. Before this I have transferred several websites from one host to another but never faced such issue. Despite following the same transfer process I was quite irritated to see this frustrating error and therefore after wasting lot of time over Internet in order to find appropriate solution I fixed the solution. So here below I have shared How I fixed WordPress Warning touch() Unable to create file with few simple steps.

Wordpress Warning touch() Unable to create file Error

The Error Displayed the following message :

Warning: touch(): Unable to create file/tmp/theme-check.2014122.1.tmp because No such file or directory in /home/dirname/public_html/wp-admin/includes/file.php on line 164

Warning: unlink(/tmp/theme-check.2014122.1.tmp):No such file or directory in /home/dirname/public_html/wp-admin/includes/file.php on line 464

Note : Important

You may find some solutions over wordpress support forums where they ask you to change your folder or file permissions to 755 and 644 etc. I did tried that one but didn’t fixed the issue and also it is advisable to not to play with the permissions of files or folder as this can lead you to serious issues i.e hacking or virus attacks on your site. So if you are expert on these then only try the changing files or folder permissions method. But in my case it didn’t work so I tried alternative fix which worked beautifully that I have shared below.

How to Fix WordPress Warning touch() Unable to create file Error : Steps to Follow

    • Go to your Root Directory i.e home/dirname/public_html/ and here search for wp-config.php file.
  • Here in the wp-config.php file just add the following line and then save your wp-config.php file.

define( ‘WP_TEMP_DIR’, ABSPATH . ‘wp-content/tmp/’) ;

  • Also create that tmp folder in your wp-content directory and set its permissions to 755.
  • That’s it just login to your WordPress Dashboard and you will no longer face the same error while trying to install new plugins or update existing plugins.
RushInformation recommends Hello Ivy for automating your workflow and project management for free. Learn More

Share This Post

Post Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.