Welcome back to shortlearner.com, in our previous post we will see how to install WordPress in CentOS.
In this post today we will see how to fix the unable to create directory error in WordPress.
so i recently i was working on a WordPress based project so when i try to upload/import media into WordPress’s media library then i got some kind of error ,which are mentioned below.
this tutorial is for you. It will show you how to fix this annoying error.
Also Read :
Get Domain name from URL
How to Send Attachment on mail using PHP.
PHP Login Script With Remember me.
How to hide extension of html and php file.?
- Unable to create directory wp-contents/uploads
- not able to create directory/ wp-contents/uploads/ Is its parent direcotry writable by the server.?
- Unable to create directory wp-contents/uploads/2020/07
There are a few different possibilities for this error to show up. I will try to cover all the possibilities so hopefully one of them will help you fix the issue.
1: Update/Change the Uploads Directory Settings
this is one of the easiest way to fix that kind of errors. i personally recommend to follow these steps if you have an error like that.
- Log into your WordPress admin dashboard.
- Go to Media which are inside the Settings menu (Settings -> Media).
- Enter wp-content/uploads in the text box.
- Save the changes by hitting the “Save Changes” button and you are done.
2. Manually Change the Folder Permission
if the above method is not working for you don’t worry about it.
we have one another trick to handle this kind of annoying errors.
just follow the below steps and change the folder permission.
- Change folder permissions on the wp-content directory to 775 and try the upload again
- If it fails, change the permissions to 777 and try again
- if it still fails then do step 1 and 2 for the “wp-content/uploads” directory too
Once you can successfully create the folder and upload the media, be sure to return the permissions on wp-content directory to 755 (your folders should have a permission of 755 for security reasons).