unable to create directory in wordpress

Unable to create directory Error in WordPress

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.

unable to create directory 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.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
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.

  1. Log into your WordPress admin dashboard.
  2. Go to Media which are inside the Settings menu (Settings -> Media).
  3. Enter wp-content/uploads in the text box.
  4. Save the changes by hitting the “Save Changes” button and you are done.
Unable to create directory Error

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.

  1. Change folder permissions on the wp-content directory to 775 and try the upload again
  2. If it fails, change the permissions to 777 and try again
  3. 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).

Unable to create directory wp-content/uploads