{"id":1321,"date":"2020-03-14T10:16:20","date_gmt":"2020-03-14T10:16:20","guid":{"rendered":"https:\/\/blog.infotheme.net\/?p=1321"},"modified":"2020-03-14T10:28:08","modified_gmt":"2020-03-14T10:28:08","slug":"step-by-step-guide-to-resolve-wordpress-missing-a-temporary-directory-error","status":"publish","type":"post","link":"https:\/\/infotheme.net\/blog\/step-by-step-guide-to-resolve-wordpress-missing-a-temporary-directory-error\/","title":{"rendered":"Step by step guide to resolve WordPress Missing A Temporary Directory Error"},"content":{"rendered":"\n<div id=\"toc_container\" class=\"no_bullets\"><p class=\"toc_title\">Contents<\/p><ul class=\"toc_list\"><li><a href=\"#Learn_how_to_resolve_Missing_A_Temporary_Directory_WordPress\"><span class=\"toc_number toc_depth_1\">1<\/span> Learn how to\nresolve \u201cMissing A Temporary Directory\u201d WordPress <\/a><ul><li><a href=\"#What_is_this_Missing_a_Temporary_Folder_error\"><span class=\"toc_number toc_depth_2\">1.1<\/span> What is this \u201cMissing a Temporary Folder\u201d error?<\/a><\/li><li><a href=\"#Why_this_Missing_a_Temporary_Folder_occurs\"><span class=\"toc_number toc_depth_2\">1.2<\/span> Why this \u201cMissing\na Temporary Folder\u201d occurs?<\/a><\/li><li><a href=\"#Learn_how_to_fix_Missing_a_Temporary_Folder_error\"><span class=\"toc_number toc_depth_2\">1.3<\/span> Learn how to\nfix \u201cMissing a Temporary Folder\u201d error<\/a><ul><li><a href=\"#Add_error_resolve_code_on_wp-configphp_file_using_File_Manager\"><span class=\"toc_number toc_depth_3\">1.3.1<\/span> Add error resolve code on \u201cwp-config.php\u201d\nfile using File Manager<\/a><\/li><li><a href=\"#Add_error_resolve_code_on_wp-configphp_file_using_CPanel\"><span class=\"toc_number toc_depth_3\">1.3.2<\/span> Add error resolve code on \u201cwp-config.php\u201d\nfile using CPanel<\/a><\/li><\/ul><\/li><\/ul><\/li><li><a href=\"#Final_Thoughts\"><span class=\"toc_number toc_depth_1\">2<\/span> Final Thoughts<\/a><\/li><\/ul><\/div>\n<h2><span id=\"Learn_how_to_resolve_Missing_A_Temporary_Directory_WordPress\">Learn how to\nresolve \u201cMissing A Temporary Directory\u201d WordPress <\/span><\/h2>\n\n\n\n<p>Missing a Temporary\nDirectory error is one of the most common and frustrating error which are faced\nby many WP users. Normally, this issue occurs when you try to upload any image\non media section or try to upload any plugin or theme file. Due to this error\nyou will not able to upload anything and creates a very frustrating situation\nfor you.<\/p>\n\n\n\n<h3><span id=\"What_is_this_Missing_a_Temporary_Folder_error\">What is this \u201cMissing a Temporary Folder\u201d error?<\/span><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"835\" height=\"352\" src=\"https:\/\/blog.infotheme.net\/wp-content\/uploads\/2020\/03\/Missing-A-Temporary-Folder-error.jpg\" alt=\"\" class=\"wp-image-1323\" srcset=\"https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/Missing-A-Temporary-Folder-error.jpg 835w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/Missing-A-Temporary-Folder-error-300x126.jpg 300w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/Missing-A-Temporary-Folder-error-768x324.jpg 768w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><figcaption>Missing a temporary folder error<\/figcaption><\/figure>\n\n\n\n<p>Explaining\nthis issue could be a little bit complicated but let me try to explain this to\nyou in a very simple way. To explain this, let me share with you once you\nupload any media file, plugin or theme file on your WP website, WordPress CMS\nworks on two steps:<\/p>\n\n\n\n<ol><li>First WordPress move your uploaded\nfile into a Temporary folder to save them<\/li><li>After that it WordPress Create or\nMove your uploaded file into an appropriate directory<\/li><\/ol>\n\n\n\n<p>Let&nbsp; us understand this\nwith an example: When you upload a new theme on your WordPress website,\nWordpress first store it into a \u201cTemp\u201d (Temporary) folder and after that\ncreates a new folder for your uploaded theme and finally move your theme files\ninto this folder.<\/p>\n\n\n\n<h3><span id=\"Why_this_Missing_a_Temporary_Folder_occurs\">Why this \u201cMissing\na Temporary Folder\u201d occurs?<\/span><\/h3>\n\n\n\n<p>As we\nalready understand how WP system works when we upload any file on your\nWordPress website. Now, it will become easy for me to explain you why this\nerror occurs J<\/p>\n\n\n\n<p><strong><em>This error occurs when this \u201ctemp\u201d folder gets deleted from\nyour server accidently either by you or by any server side malfunction or due\nto any other script.<\/em><\/strong><\/p>\n\n\n\n<p><strong><em>This issue can also be occurs due to some permission issue\nset by your website hosting server.<\/em><\/strong><\/p>\n\n\n\n<h3><span id=\"Learn_how_to_fix_Missing_a_Temporary_Folder_error\">Learn how to\nfix \u201cMissing a Temporary Folder\u201d error<\/span><\/h3>\n\n\n\n<p>There are\nmany solutions available to resolve this error introduced by any WP experts but\nI will try to explain the most simple and easy method to do it.<\/p>\n\n\n\n<p>We will add\na line of code shared below on \u201cwp-config.php\u201d file.<\/p>\n\n\n\n<p>define(\u2018WP_TEMP_DIR\u2019,dirname(_FILE_). \u2018\/wp-content\/temp\/\u2019);<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1000\" height=\"554\" src=\"https:\/\/blog.infotheme.net\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2.jpg\" alt=\"\" class=\"wp-image-1325\" srcset=\"https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2.jpg 1000w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2-300x166.jpg 300w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2-768x425.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><figcaption>edit &#8220;wp-config.php&#8221; file to add code<\/figcaption><\/figure>\n\n\n\n<p>We can\naccess and edit this file using your \u201cFile Manage Logins\u201d or your \u201cCPanel\nlogins\u201d.<\/p>\n\n\n\n<h4><span id=\"Add_error_resolve_code_on_wp-configphp_file_using_File_Manager\"><strong>Add error resolve code on \u201cwp-config.php\u201d\nfile using File Manager<\/strong><\/span><\/h4>\n\n\n\n<p>Let us\nunderstand how we can resolve this issue using File Manager login step by step:<\/p>\n\n\n\n<ul><li>Use\nany FTP client app like Filezilla<\/li><li>Use\nyour FTP logins like: hostname, username, password, port<\/li><li>Connect\nFilezilla ( or any other FTP app client) to your server, now you will be able\nto see your website files<\/li><li>Open\n\u201cpublic_html\u201d folder<\/li><li>Now,\nyou will see \u201cwp-config.php\u201d file, right click on it and download this file.<\/li><li>Open\nthis file on any text editor like \u201cnotepad++\u201d or \u201cvisual studio\u201d, or \u201cnotepad\u201d\nor anything you like.<\/li><li>Copy\nbelow line of code:<ul><li>&nbsp;define(\u2018WP_TEMP_DIR\u2019,dirname(_FILE_).\n\u2018\/wp-content\/temp\/<\/li><\/ul><\/li><li>Paste it on file just\nat any location below:<ul><li><strong>Right before<\/strong>&nbsp;the line that says \u201c<em>That\u2019s all, stop editing! Happy blogging<\/em>\u201d&nbsp; Or, <\/li><\/ul><ul><li>After define\ndebug line or define memory limit line<\/li><\/ul><\/li><li>Save the changes\nand upload the updated file on server.<\/li><\/ul>\n\n\n\n<p>Above steps will define the location\nof temp (Temporary) folder so that WordPress can look for this location to find\n\u201ctemp\u201d folder.<\/p>\n\n\n\n<p>Now, we have to make a final change.\nWe will have to create a \u201ctemp\u201d folder inside \u201cwp-content\u201d directory on your\nserver. &nbsp;To do this follow the below\nsteps:<\/p>\n\n\n\n<ul><li>Locate and open \u201cwp-content\u201d\nfolder <\/li><li>Create a folder\nnamed \u201ctemp\u201d on this location or Create an empty folder with name of \u201ctemp\u201d on\nyour local system and upload that here.<\/li><\/ul>\n\n\n\n<p>Now you are all done! <\/p>\n\n\n\n<p>We have resolved this issue. Now you\nwill be able to upload any media file, plugin file or theme file on your WP\nwebsite.<\/p>\n\n\n\n<h4><span id=\"Add_error_resolve_code_on_wp-configphp_file_using_CPanel\"><strong>Add error resolve code on \u201cwp-config.php\u201d\nfile using CPanel<\/strong><\/span><\/h4>\n\n\n\n<p>We can access and modify the \u201cwp-config.php\u201d file using your CPanel logins as well and can resolve this issue. Let us understand this step by step:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"783\" height=\"457\" src=\"https:\/\/blog.infotheme.net\/wp-content\/uploads\/2020\/03\/File-manager-folder-on-cpanel.jpg\" alt=\"\" class=\"wp-image-1326\" srcset=\"https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/File-manager-folder-on-cpanel.jpg 783w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/File-manager-folder-on-cpanel-300x175.jpg 300w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/File-manager-folder-on-cpanel-768x448.jpg 768w\" sizes=\"(max-width: 783px) 100vw, 783px\" \/><figcaption>File Manager folder on CPanel<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1000\" height=\"577\" src=\"https:\/\/blog.infotheme.net\/wp-content\/uploads\/2020\/03\/edit-wp-config-file1.jpg\" alt=\"\" class=\"wp-image-1327\" srcset=\"https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file1.jpg 1000w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file1-300x173.jpg 300w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file1-768x443.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><figcaption>wp-config.php file<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1000\" height=\"554\" src=\"https:\/\/blog.infotheme.net\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2-1.jpg\" alt=\"\" class=\"wp-image-1328\" srcset=\"https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2-1.jpg 1000w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2-1-300x166.jpg 300w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/edit-wp-config-file2-1-768x425.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><figcaption>Edit and Update wp-config.php file<\/figcaption><\/figure>\n\n\n\n<ul><li>Login\nto your website hosting server using your CPanel logins. Normally, you can\naccess your cpanel by adding <strong>\/cpanel <\/strong>at\nthe end of your website URL.&nbsp; For\nexample: yourwebsite.com\/cpanel or any other link provided to you by your\nhosting company.<\/li><li>Use\nyour CPanel logins to access your CPanel admin dashboard.<\/li><li>Locate\n\u201cFile Manger\u201d folder on your Cpanel and click on it to open.<\/li><li>Now,\nyou will be able to see your WordPress website files.<\/li><li>Locate\nand open \u201cpublic_html\u201d folder<\/li><li>Now,\nyou will be able to view \u201cwp-config.php\u201d file<\/li><li>Right\nclick on this file and open it on text or code editor<\/li><li>Copy\nbelow line of code:<ul><li>&nbsp;define(\u2018WP_TEMP_DIR\u2019,dirname(_FILE_).\n\u2018\/wp-content\/temp\/<\/li><\/ul><\/li><li>Paste it on file just\nat any location below:<ul><li><strong>Right before<\/strong>&nbsp;the line that says \u201c<em>That\u2019s all, stop editing! Happy blogging<\/em>\u201d&nbsp; Or, <\/li><\/ul><ul><li>After define\ndebug line or define memory limit line<\/li><\/ul><\/li><li>Save the changes\nand close the file editor.<\/li><\/ul>\n\n\n\n<p>As we have added the code on file, it\nwill tells the WordPress system to look for the \u201ctemp\u201d folder inside the \u201cwp-content\u201d\nfolder.<\/p>\n\n\n\n<p>But we don\u2019t have any folder there.\nNow, we have to make a final change.<\/p>\n\n\n\n<ul><li>Open the \u201cwp-content\u201d\nfolder<\/li><li>Right click and\nclick on \u201cCreate a new folder\u201d option and name it as \u201ctemp\u201d<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"1000\" height=\"470\" src=\"https:\/\/blog.infotheme.net\/wp-content\/uploads\/2020\/03\/create-new-folder-using-cpanel.jpg\" alt=\"\" class=\"wp-image-1329\" srcset=\"https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/create-new-folder-using-cpanel.jpg 1000w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/create-new-folder-using-cpanel-300x141.jpg 300w, https:\/\/infotheme.net\/blog\/wp-content\/uploads\/2020\/03\/create-new-folder-using-cpanel-768x361.jpg 768w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><figcaption>Create a &#8220;temp&#8221; folder inside &#8220;wp-content&#8221; folder<\/figcaption><\/figure>\n\n\n\n<p>Now, we have made the necessary changes to resolve this \u201cUpload a Temporary Folder\u201d issue.<\/p>\n\n\n\n<h2><span id=\"Final_Thoughts\">Final Thoughts<\/span><\/h2>\n\n\n\n<p>Try to follow this tutorial to resolve\nthis issue but if the issue still persist, it could be a reason of your hosting\nserver settings or permission issue set by them.<\/p>\n\n\n\n<p>The best way to resolve the server\nrelated issue to contact your hosting server support team either via Phone\nSupport, chat support, email support and they will resolve this issue for you.\nI hope this tutorial will be helpful to you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contents1 Learn how to resolve \u201cMissing A Temporary Directory\u201d WordPress 1.1 What is this \u201cMissing a Temporary Folder\u201d error?1.2 Why this \u201cMissing a Temporary Folder\u201d [&hellip;] <span class=\"read-more-link\"><a class=\"read-more\" href=\"https:\/\/infotheme.net\/blog\/step-by-step-guide-to-resolve-wordpress-missing-a-temporary-directory-error\/\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":1332,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[135,132],"tags":[297,75,298],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/posts\/1321"}],"collection":[{"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/comments?post=1321"}],"version-history":[{"count":3,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/posts\/1321\/revisions"}],"predecessor-version":[{"id":1331,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/posts\/1321\/revisions\/1331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/media\/1332"}],"wp:attachment":[{"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/media?parent=1321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/categories?post=1321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infotheme.net\/blog\/wp-json\/wp\/v2\/tags?post=1321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}