Solve the ‘JFolder::create: Could not create directory’ Error in Joomla

Published On :

Like WordPress, Joomla also has a lot of functionalities. It can be used as a tool for Blogging. Though WordPress is much more reliable for that purpose.

But when we talk about a CMS (Content Management System), the first name comes into our mind is Joomla. It’s not that WordPress cannot be used as a CMS.

The thing with WordPress is that it’s not flexible enough to be used as a CMS. On the other hand with Joomla you can create a Dynamic Site using it’s varied functionalities.

Could_not_create_directory_joomla_error

Yesterday, When I was moving a client site to his server, I noticed a nagging error while Installing Packages. In Joomla Packages means – Modules, Component, Templates & Plugins.

SYNTAX :-

JFolder::create: Could not create directory

Warning! Failed to move file.

This error occurs when you move from one host to another host. It is because when we move a Joomla site from one server to another server, the log & tmp functions present in the configuration.php file contains the directory path where you had previously installed Joomla i.e. on the old server.

Fix forJFolder::create: Could not create directory’ Error

Unlike other Errors, the fix for this error is pretty Simple. Follow the steps below to fix it.

  1. Goto your Hosting panel >> File Manager >> Select your Domain/Sub-Domain and then open the configuration.php file.
  2. Find var $log_path, it will contain the Directory path of your Old Server. Just replace the whole line with the code var $log_path = './logs';
  3. Find var $tmp_path, it will also have the Directory path of your Old Server. Replace the whole line with the code var $tmp_path = './tmp';

That’s it! Your problem will be solved with this small tweak in the code. Make sure that you properly copy paste the code. If you still face any problem then don’t hesitate to put in a Comment with your query.

Subscribe to Our RSS Feeds / Daily Updates if you don’t want to miss the ‘Top 10 Joomla Extensions’ post which I will be making soon. Meanwhile read the top 10 WordPress Plugins I use on DailyBlogging.

Did this tweak help you to fix your problem ??

Share :
Tagged as : 138 Comments
About » Has written 231 Post(s) «

I'm a Web Designer/Developer, SEO'er and a Blogger who gives a few Blogging Tips in the form of posts/tutorials. Follow & Subscribe to my Blog if you feel it's worth it.

HostGator
Loader

138 Comments Comments RSS

  1. #

    I remember having that issue long time ago!

    • manoj
      #

      Hi,

      you have any idea how to resolve it?

      Please any help will be appreciated

    • andrew
      #

      This fixed my problem, thankyou so much!

  2. #

    Cool. Thanks for the info, although I don’t use Joomla much.

  3. #

    Haven’t used Joomla in the past two years, So I am not aware of this error. Anyway, thanks for sharing.

  4. #

    hi can you help me ill try to install joomla template to my site at webng but it always show like your problem you discuss above how can i install it without saying JFolder::create: Could not create directory” Error in Joomla when i upload my template to my hosting joomla site can you help me ???

  5. #

    How about you try out the SOLUTION HE GAVE before asking?

  6. #

    Yes when we migrate from one host to another errors of this kind appear in Content management systems. Thanks for providing the solution

  7. #

    its working man….!!!thank you soo*n much…!!!

  8. #

    Thanks Mani for sharing his fix..I had seen this error but couldn’t find it’s Fix..

  9. #

    Actually, it’s one of the great post, Mani.

  10. #

    Thanks very much. This works.

  11. fitria
    #

    thank you very..very much… your simple answer bright my day :D…

  12. JChamp
    #

    Thank you very much for this posting and for helping to quickly and easily solve my problem.

  13. #

    Thanks from Spain. I had a problem and I solved in 1 minute

  14. #

    I tend forget this easily, that’s why I bookmarked your site.

    Thanks!

  15. #

    Still have the same problem, i don´t know what else to do, I´m using parallels and I can´t install anything… any other advice?

    • #

      well maybe since you are using Parallels, the root directory needs to be changed in the code.

  16. #

    do you mean in the configuration.php? I´ve done that and nothing happened. Tnx for another advice

  17. #

    Hi.
    I am having the exact same proble that you described in the article.

    I have followed the whole porcedure but I am getting this error message and the file code does not change: [a fatal error or timeout occurred while processing this directive]

    should I contact my host? Or is it something I can deal with?

    thanks

    • #

      Yes in Cpanel I have got those errors. It’s just a host issue, contact them & it will be solved.

  18. #

    Yup, I contacted my host and asked to change the permisions in CHMOD (Linux) or IUSR user (Windows) and everything is working fine. I suggest for you to do that, you will save a lot of headackes and time. Tnx anyways and see you the next time.

  19. #

    I’ve using Godaddy VDS hosting , also having this problem, but ur solution doesn’t work, pls kindly advise

    • #

      I haven’t really used GoDaddy even once. So I don’t know how their panel & root urls look. But in a general view,check whether (in GoDaddy) that the tmp & log folders have the same name. If they are different then change that in the syntax.

    • #

      In Linux VDS hosting, “JFolder::create: Could not create directory” Error in Joomla is a permission problem, Now I’ve change the Godaddy Simple Control Panel to Kloxo Contronl Panel & use the “suPHP” , so the problem solved.

  20. #

    I’m facing this problem with a client’s side. I tried changing the path of the logs and tmp just like you suggested. Unfortunately, there’s no change and I’m still getting this error. :(

    • #

      I contacted my host linking this page and they changed the configuration file for me in a couple of hours..

      ;)

  21. giovanni
    #

    You are the first !!! It works fine !! Thanks you my friend !

  22. #

    It saved my time, i am grateful.

  23. #

    Hello, Mani! You have done an fantastic job, nice tips ……………………… code reference will be helpful for joomla beginners.

  24. #

    this is not a complete solution.. its just one of the solution… there are several problems that might result in the above referred error codes…

    one of them is definitely the user permissions which avoid the creation of the folders..so u need to set the user permission to nobody.. which is ofcourse dangerous..

    if u use SUPHP.. there will be lot of problems when u setup the site with caching.. the server resources will go for a toss..refrain from suPHP.. try out changing permission to nobody.. and after u are done.. get it back to ur user id..

  25. kamaludeen
    #

    Thank you …very nice

  26. #

    am just a beginner in joomla, So didnt face any issue till now

    Recheck the title :)

    http://awesomescreenshot.com/026e83e0f

  27. Ravinder
    #

    Sir i have same problem and i try so many things. this is under my sub domain example:

    http://www.example.com/myfolder

    i try this

    var $log_path = ‘./logs’;
    var $tmp_path = ‘./tmp’;

    var $ftp_enable = ’1′;
    var $ftp_root = ‘www/us_educare’;

    But still not solved.. Please explain for me…

    • #

      The sub directory or domain has nothing to do with the tmp & logs folders. Maybe as an above commentator said, check the permissions or contact your host.

  28. #

    the method is same of J1.6

    I used this and working fine

    $log_path = /home/name/public_html/beta/logs’;
    $tmp_path = /home/name/public_html/beta/tmp’;

    • #

      I was using the same method

      $log_path = /home/hostname/public_html/beta/logs’;
      $tmp_path = /home/hostname/public_html/beta/tmp’;

      and I tried the above command
      none of them are not working…

  29. #

    I have tried this solution and it did not work for me.

  30. Tanya
    #

    Perfect, thanks a million! I wish I found this two hours ago. But things are rockin’ now!

  31. #

    Yep worked perfect for me. Thanks heaps.

  32. Amaaayh
    #

    Thank you so much , it’s working like a charm !!!

  33. #

    God thanks a lot for the solution! i am a newbie to joomla so this error troubled me a lot!

  34. #

    this did not work for me…
    it come up when i was trying to create a new menu.
    i have applied your fix, and also changed permission for the cache folder to 777, as suggested in other fixes…

    error is actually visible here….http://decorativeplumbingonline.com/index.php/steel-optik

    any help greatly appreciated

    walter

    • #

      Are you on a proper Linux host ? | If you are on GoDaddy or some other host then as ‘Korner’ said you may need to talk to your host and make them change the perms and the VDS.

  35. David Ballester
    #

    Hi:

    Thanks for the tip, it solved exactly my problem with GoDaddy. FYI, i was able to change directly the var values from the administrator panel of J!1.6 ( Site->Global Configuration, Label System and Server ) without having to touch the configuration.php directly. I think that’s a more easy solution when you have not direct access to the filesystem.

    • mh
      #

      Thanks a lot, worked for me also by changing the system and server settings in global configuration!

  36. Jaime
    #

    Thanks! It worked!

  37. Bryan
    #

    You are awesome!! Fix totally worked for me with a fresh install of 1.7 having that same issue

  38. G
    #

    Thanx!!

  39. #
  40. Cristi
    #

    Hi, beside what everyone is telling here there is one more folder that should be chmod-ed. the “cache” folder. Apparently some modules use cache folder instead of tmp folder. Try to chmod the cache folder guys.

    Best regards.

    • #

      Thanks mate, I finally got rid of the error. Everyone on the web keeps telling about logs and tmp dirs.

  41. Kris
    #

    Thank you, sir!

  42. Daniel
    #

    I had such problems as
    JFolder::create: Could not create directory
    Warning! Failed to move file
    JFolder::create: Path not in open_basedir paths errors

    Simply enable your FTP from the menu Site -> Global Configuration -> Server and then click on Apply. You will be asked your FTP username and password. Enter them and click Save. Now try installing your components or modules or plugins.

    • #

      Dear Friend,

      I owe a huge thank you for such a efficient and soothing solution.

      Keep Doing Gr8 Work.

      Regards

  43. hariz
    #

    thanks !!!

  44. Jonathan
    #

    [TRANSLATED] Excellent post, for days trying to solve that problem by installing an extension until thanks to this article, it solved. Thank you!

  45. #

    Hello Buddy
    Thanks for your useful post. It solved my problem. Thank you so very very much….

  46. Sandeep
    #

    This really worked. Thanks!

  47. Daniel
    #

    Happy that solved the problems… cheers to Joomla…

    • #

      Worked perfectly, Thank you!!

  48. Joomlajunkie
    #

    Thank you,you helped me fix this problem in Joomla 1.6

  49. hassan
    #

    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/islamdef/public_html/demo/libraries/joomla/filesystem/folder.php on line 506
    how can we solve this problem in joomla

  50. StefanKK
    #

    Comment#51

    Thanks!! It was the cache that was screwing me over lol, but now everything is zipping by :D

  51. Seb
    #

    Wow thanks a lot for solving my problem.

    If it can help someone, i’m using godaddy server… I had to make sure all the permission of my joomla folders were on WRITE/READ before doing that.

  52. #

    To explain why some people might be having issues with this after making the change:

    The main cause of this issue is that after changing hosts, more then likely your account username have changed, and even if your file structure stays exactly the same, this minor change is username is going to result in the error.

    I had the exact same error occur.

    Previously to the change your configuration.php probably looked something like this:

    public $log_path = ‘/home/ACCOUNTUSERNAME/public_html/logs’;
    public $tmp_path = ‘/home/ACCOUNTUSERNAME/public_html/tmp’;

    (or some variation)

    Now using the fix that mani has posted, will work in some cases , provided that your host allows for “relative urls” to be used on your hosting account.

    Unfortunantly not all hosts allow this however, but all is not lost.

    You can still resolve the issue by using a “absolute url”.

    Usually, unless you have made drastic changes to your file structure, the only changes you may need to make is change the section I have marked with “ACCOUNTUSERNAME” to what your host has given you as your cpanel/plesk username.

    This will usually be able to be seen, with most hosts, in your control panels file manager and will follow roughly the same format I have posted above, and you need to put in the path from your “home” location all the way into your file structure to your “logs” and “tmp” folders.

  53. hung cuong
    #

    thank you!

  54. #

    one of the great post

  55. Badal
    #

    Thank you so much! Great solution rather than asking help from your web host!

  56. myrre
    #

    hey,
    My error looks like this:
    JFolder::create: Could not create directory
    The destination directory doesn’t exist or is a regular file
    Image upload error

    And nope, the above instructions do not help. :(
    Any suggestions?

  57. Phizy
    #

    Hye, i’m experiencing the same jfolder problem

    but i already set the paths, in the system info, the permission is writable, checked with the server, permissions are given 775, paths is leading to the correct folder. tried changing to what u suggested, and it changed to unwritable at the system info.

  58. #

    Try making sure of the permissions of your public_html (or httpdocs) are set correctly as required by your host, and make sure that the folders /tmp and /logs exist inside the folder and that /tmp and /log have the correct permissions.

    Usually this will be 755/750 depending on host (never use 777 unless you absolutely have to).

    If you are unsure on how to set permissions, contact your host, they migh have an easy way to do this , although personally I use filezilla, some hosts wont allow permissions be changed on public_html/httpdocs.

    Beyond that, it could be a varying number of possible issues.

  59. james
    #

    Thank you very much …what a selfless service …you are serving humanity..

    Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  60. #

    Thanks for the tip. I recently moved all my sites to a new server and got this ‘JFolder::create: Could not create directory’ error when I tried to upload components on my joomla sites. Made the change and voila! Problem solved.

  61. #

    hmm… this didn’t solve the problem for me… any other ideas?

  62. #

    Thanks for the tip, saved me time for contacting my provider. I had to change file’s permissions in order to be able to edit it’s content. Thanks again!

  63. Golda Lushington
    #

    It works! Thank you!

  64. andrew
    #

    You saved my life. I worship you.

    Thanks for the tip

  65. #

    This was really helpful! Thank you!

  66. colin
    #

    i got this error
    JFolder::create: Path not in open_basedir paths
    Warning! Failed to move file.
    JFile::read: Unable to open file: ‘./tmp/plg_sigplus-1.3.4.10.tgz’
    Unable to read archive

    may i know what is the problem?

  67. #

    Colin, in your case the error appears to be different then others here and the “open_basedir” setting is generally defined by the host and they may/may not allow this to be overridden via a custom php.ini, so you may need to contact them, and depending on the quality of your support, they may be able to assist.

    Or, depending on the version you are using and the version of PHP (if its older version of PHP) it could be related to http://docs.joomla.org/Why_can't_you_install_any_extensions%3F

    I did find some people saying a fix was found here :

    http://forum.joomla.org/viewtopic.php?f=429&t=276318

    HOWEVER I have NOT tested this myself, so I can NOT attest this to be the case , and without knowing exactly what version THEY were using, what version YOU have, fully testing, and a lot of other stuff, I can not say if it will work or not.

    Keep in mind, that post does appear to be from 2008, but there are replies on there from 2011 saying that they used the fix.

    I would recommend IF you try it MAKE SURE to take a backup first before trying any fixes.

  68. barry
    #

    I have this problem but haven’t change host server. I upgraded from to 1.5.25 version and now cannot install any packages. I tried your fix anyway but it hasn’t worked. Any advice or direction is much appreciated ?

    thanks

  69. #

    hello can you help meplease, i have this “JFolder::Files: Path is not a folder..in media manager,and all the images in articules are broken

  70. Charles
    #

    Thank you for your
    great tutorial.

    I’m using joomla 2.5
    Would you let me know please
    do I havet to change the

    “public $tmp_path = ‘/tmp’;”

    to

    “var $tmp_path = ‘./tmp’;”

    Many Thanks and Best Regards
    Charles

  71. LaShaunn Tappler
    #

    You, my dear, are AWESOME!!!!!!!!!!!!!!

  72. Paul
    #

    THANK YOU SO MUCH!

    Last night I spent 2 hours trying to solve it and then I got very angry and decided to leave it for some other time. Today I Googled the error and loking for a solution and this method helped me solve the problem. Once again, thank you!

  73. L. Oyebo
    #

    Thanks it worked for me.

  74. #

    Thanks, Your Suggestions Solved my problem

  75. ahmad
    #

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

    thank you <3 <3 <3

  76. #

    Just wanted to say thank you.
    You solved me so much time and money.
    Thank you and again thank you for this.
    Ilan.

    • Meren
      #

      So many methods are provided above for solving the same problem. It will be helpful if you could kindly mention which method has worked for you. Thank you.

  77. #

    Brilliant, had this issue on 123-reg and your solution worked perfectly.
    Míle buíochas

  78. Aung
    #

    That’s really helpful !!! thanks you !!!

  79. #

    Was using Joomla 1.5.x.
    This fix worked very well.
    Thank you very much!

  80. RamonB
    #

    Hi, My problem is like others
    JFolder::create: Could not create directory
    Warning : Failed to move file !

    The problem with me is that I am not moving my website from other place, and the other difference is that I am not using a Hosting company… I have a computer, I installed Ubuntu, I installed Joomla 2.5 as well. Now I am working with Joomla, but I need to install K2 v2.5.7… I downloaded it and when I go to Extension Manager, that it shows me that error. I modified the configuration.php file and put it ‘./logs’; and ‘./temp’; also I chmod 777 cache and many others files and dir, but still I have the same message… What can I do ?
    Thanks for any help

  81. vinod
    #

    thanks.. the above solution works..

  82. surjink
    #

    nothing that i can say but Thank you so much..
    you greatly help me out of this problem :D

  83. #

    It fixed my problem!

    What’s weird is that I’ve never moved my site. Whatever… thanks for your help!

  84. Arman
    #

    tanks a lot

  85. Anoop
    #

    Hi, Thanks..it helped a lot..:)

  86. Lomoba
    #

    Thank you, you just made my day with your fix!

  87. #

    This was very helpful. Thanks!

    • Saru
      #

      it worked

  88. #

    Thanks! I feel like a moron now!

  89. #

    Thanks!!! Its working for me……..

  90. Bonsai
    #

    nope. doesn’t work.

  91. Sanchita
    #

    Thanx… :)

  92. Avee
    #

    Thanks! This worked like a charm!

  93. yahya
    #

    Thank you so much..
    you greatly help me out of this problem :D

  94. #

    Life saver :) Thanks a lot, worked perfect.

  95. #

    Well I went through all but not working for me. Recently I migrated my site from Cpanel to Plesk. Everything working fine except K2news “mod_lofk2slideshow” if I enable it show blank page if I remove all work fine so I created one new module using “mod_lofk2slideshow” to show in my homepage. Now I got “JFolder::create: Could not create directory” I give permission writable wont work so change to Unwritable as in Cpanel this too wont work.

    Let me know what do I need to do here. I check all configuration.php all seems fine.

    Thanks.

  96. #

    This did not work on Media Temple (mt), On the gs server I had to use:

    /nfs/c10/h01/mnt/123456/domains/example.com/html/logs

    which is:

    /nfs/c/h/mnt//domains/example.com/html/logs

    Do the same for tmp, The server info for clusters and sectors are on the (gs) Server Guide: Overview page

    This fix is easier on their dv server because this page give the root path

    I figured it out by going to another clients installation on the same server type and making sense of the directory paths…

    • #

      the previous post modified my path explanation because i used the < and > characters…

      Here is the path info:
      /nfs/c’Grid Cluster’/h’Storage Segment’/mnt/’Site Number’/domains/example.com/html/logs

      • brodster
        #

        hey, Leon did you get it fixed, i have media temple gs, and the suggestion above did not work

  97. Abdeali
    #

    Thnx for the help

  98. #

    Great. I’ve been searching for hours on how to solve this error. The mistake was in front of my eyes and couldn’t see it. I’ve already changed the domain.com both on $log and $tmp. but I should have changed also the root of the domain, as I have transferred from one host to another. Letting ‘./logs’; and ‘./tmp’; just solved it. This post will help a lot of people as I have seen many questions about this.

  99. ankit
    #

    thanks it worked

  100. #

    thanks its work

  101. #

    after I do this my logs and tmp folder permition read as unwritable in system info. Help…

  102. Vahid
    #

    Thank you , it worked :-)

  103. jammy
    #

    Fantastic life saver. !!!

  104. James
    #

    Thanks lots … i am new to joomla … I really appreciate …

  105. #

    works great!!! thanks a lot…

  106. #

    Great help indeed.

  107. mustafa
    #

    thanks for your help

  108. #

    Many thanks.

    This fixed my path issue I had on a VPS server.

  109. kietvt
    #

    Thanks so much. Great help.

  110. #

    Very usefull, I use Joomla 1.5.25 and had to make a change in the global configuration as well. In global configuration/Server/Server settings change the path to temp folder also to ./tmp. Many thanks again.

  111. #

    ThaNks Buddy for the help..

  112. #

    1. Open “your-website.com/libraries/joomla/filesystem” with your default FTP client.

    Please make backup of the file first.

    2. Download filename “folder.php”.

    3. Open folder.php in your default text editor

    4. Go to line 210

    5. Look for: ” if (strpos($path, $test) === 0) { ” and change it to “if (strpos($path, $test) === 1) { ”
    6. Than look for (line 216): ” if ($inBaseDir == false) { ” and change to ” if ($inBaseDir == true) { ”
    7. Save your file (folder.php)
    8. Upload it to the location “your-website.com/libraries/joomla/filesystem”.

    That’s it!
    No more errors when you want to install any component, plugins, module, etc.. in backend of joomla

  113. #

    Hello. I’m having this error just now in my remote site, but I haven’t moved it from any remote server to no other. It’s in the same host. So, is there some other explanation as to why this may be happening? I’d like to point out the only thing I did was downloading a backup of my site to my computer, but I was always working in the remote server and all of the sudden, without notice, I can’t upload a plug-in because of this error. Please help.

  114. #

    AWESOME! This fixed my issue. Great work guys. Thanks a bunch!

  115. #

    plz can i do this changes in the FTP server……

  116. Tawanda Ziki
    #

    Back to BASICS, check the space on your server. I had used my 50MB out of my 50MB quota that’s why it did like this to me.

  117. aa
    #

    I have proble with JFolder Could not find directory

  118. #

    Mani, Many thanks!!!
    =)
    It worked like a charm, you´re right, joomla just have information from the old server.
    Cheers from Brasil!!
    Lucas

Post a Comment

Your email is never published nor shared. Required fields are marked *

Also, use your Real name in the 'Name' field. Comment names with only keywords will be trashed.