Drupal error : DrupalTemporaryStreamWrapper temporary directory not found

Most web developers prefer to develop sites on a local development machine and then upload to a live server as it speed up the development process. In my previous post, I discussed about migrating a site on local development server to a live server which you can refer this post. This post is about an error which we usually face when migrating a Drupal site from local development server to a live server. After migrating a Drupal site from local development server to a live server or simply put, from one server to another, we will usually encounter this error.

Error: Warning: file_put_contents(temporary://): failed to open stream: "DrupalTemporaryStreamWrapper::stream_open" call failed in file_unmanaged_s


Watch this short video about the error above and how to fix this error.




Cause:
The cause of the above error is because the new server is not able to find the temporary directory set in "Configuration > Media > Temporary Directory". The temporary files directory used during the development on the local server is not found on the live server.

Resolution:
To resolve the above error, which is due to the fact that the temporary files directory used on the local server is not found on the live server, create a new directory for storing temporary files on the live server.

1) Login to the live site's control panel and open File Manager
2) Navigate to "public_html" where your site files are uploaded.
3) Create a new directory say "tmp" 
4) Now login to the live Drupal site as an administrator
5) Navigate to "Home » Administration » Configuration » Media and set temporary directory
6) Enter the temporary files directory as "\tmp"
7) Save the changes

The above actions should resolve the error.

Comment with Facebook

Comments

Related Posts Plugin for WordPress, Blogger...