"JFolder::create: Could not create directory" is a really common error message that people see after moving, copying or installing a Joomla site.
Here's how to check for and solve this problem:
When might you see this problem?
You might see this problem while uploading an extension:
* JFolder::create: Could not create directory
* Warning: Failed to move file!
If you get that error message you can confirm the problem by going to Extensions > Extension Manager > Warnings and looking for the following warning:
The PHP temporary directory is not set
The PHP temporary directory is the directory that PHP uses to store an uploaded file before Joomla can access this file.
Solution 1. Check for a /tmp/ folder
- Go to your main Joomla directory. The image above shows the view through Filezilla.
- Look for a folder called /tmp/ and f there isn't one, create it.
Solution 2. The /tmp/ folder must be readable and writable
- Using an FTP client like FileZilla or your server control panel's file manager you should be able to view and control the permissions on the file.
- The permission on the /tmp/ folder should be 755. You can see that in the Permissions Column.
- The second factor is Ownership. If you look in the Owner/Group column and see that the numbers match all the other numbers in the list. Owner is 617 and the group is 615. If everything looks similar on yours, you are probably ok. For instance all the Owners above are 617. If the Owner of tmp is anything else, you should contact your hosting company and ask them to change. Especially if the number is 0 or 99, or the word "nobody". We also have a short discussion on owners and permissions here.
Solution 3. The path to the /tmp/ folder must be correct in Global Configuration
- In your Joomla Administrator area, go to Site > Global Configuration > Server.
- Check to see that the Path to Temp Folder is the path to the one you found our created in the last step. This should be the server path not the URL (https://yoursite.com etc)
If you've transferred your site between servers this will definitely need to be checked. You can also change this by changing the configuration.php file. There is a complete tutorial on all the sections of the configuration.php file here.
In case you run into other problems you might check out these additional tutorials: