How to fix “installation failed: Could not create directory”

By Rebecca
27 Min Read

The “Installation failed: Could not create directory”. The error message is a relatively standard error message that many WordPress users receive. It often happens when users try to use a new version of WordPress, try to update WordPress plugins, or add and update themes. Why does it happen and how do you fix Installation failed: Could not create a directory?

This happens due to an error during installation. The message tells us that the installation was not successful because WordPress could not create a new directory. Therefore, we receive the error message “installation failed: Could not create directory”. Essentially it means that the user could have missed a crucial step during the installation.

Fortunately, there are a few things you can do to fix the problem. You should know that when WordPress creates a new website, its files are stored in folders or directories, which the webserver creates. These folders can only be accessed if you give WordPress permission to do so; Failure to do so may result in various error messages, such as “Installation failed: Could not create directory” or “Could not write to disk.” Error message.

The error also occurs if you exceed your server’s quota limit, or if the directory you are trying to reach is already full.

Learn more about this in this article created by our team at WPDatatables.

The web server must own the directories

Installation failed: Could not create directory – The first step in getting rid of this error message is to make sure your web server owns the directories where WordPress is installed.

To do this, you will need to enter a few lines of code. The first line of code is used to access your username if you don’t know it.

# ps aux | egrep ‘(apache | httpd)’

This code will list all the processes that are running, with the user names in parentheses. The next step would be to allow WordPress access (or ownership) to all the directories where WordPress is installed.

# chown -R apache / var / www / html /

Option 1: Update folder permissions with cPanel

Installation failed: Could not create directory – The permissions for the use of the folder depending on the rights that each user has. Within the web hosting server, each server will have permission to read, write, and execute. These will depend on the permission levels based on the user’s permissions.

For this option to work for you, you will need access to cPanel and an Internet connection. These are the steps you must follow.

NOTE: Setting 755 means the following:

  1. Read, write and execute for the owner, which can be you or anyone who signs in with your name.
  2. Read and execute options for groups (mainly applicable to Linux, where users are organized in groups)
  3. Read and execute permissions for other users (for example, readers of your website).
  4. The next step after the process is complete, is to select all the files in the root directory again and right-click, select “File Permissions”, and a dialog box will appear.
  5. This time you will need to enter the number “644” below the numeric value field. Click on “Use subdirectories” and select “Apply to files only”.
  6. Confirm the changes. Clear your browser cache and try installing a plugin or theme. Now, “Installation failed: Could not create directory” the error message shouldn’t appear again, and you should be able to install plugins and themes in the future.

Read more: How to fix the error sorry you are not allowed to access this page. wordpress

Option 2: configure FTP permissions in the file “wp-config.php”

Installation failed: Could not create directory – Another way to get rid of this error message if the first option was unsuccessful, is to try changing the FTP permissions by setting the “wp-config.php” file.

This option may correct the error message, as your server might not have permission to write new files. That’s why the operation fails every time, and you can change it by setting the “wp-config.php” file.

This process is quite simple. Here are the steps to correct the “Installation failed: Could not create directory”. error.

  1. From your web hosting account, open the “File Manager”.
  2. Inside the root folder, find the file “wp-config.php” and open it.
  3. In your “wp-config.php” file, enter the following code passage.
    NOTE: Replace the information in parentheses with your information.
    define (‘FS_METHOD’, ‘ftpext’);
    define (‘FTP_BASE’, ‘/ pathtorootofyourblog /’);
    define (‘FTP_USER’, ‘ftpusername’); define (‘FTP_PASS’, ‘ftppassword’);
    define (‘FTP_HOST’, ‘’);
    define (‘FTP_SSL’, false);
  4. Save the file “wp-config.php”.
  5. Go back to your dashboard and try installing the plugin or updating one more time. This time, it should be done without any problem.

Other possible solutions

Although it seems unlikely, the error “Installation failed: Could not create directory” it can be caused by insufficient disk space on your server. It is a common problem if you are using shared hosting.

Make sure you have enough space to install the new files. Also, you should not store your backups in the same folder as your server, as you are risking your reservations with this method. Instead, use a cloud backup service like Dropbox.

Having enough disk space is the first prerequisite for installing new files. Since disk sizes are larger today, this problem is often ignored. However, it will be a problem if your disk space is small. You can mark it as another option if the above has not worked.

More about file permissions

As mentioned earlier, various file systems use file permissions and allow files and folders to read, write, and run processes. Similarly, WordPress gains access to your data for the website and needs permission to moderate files within the “wp-content” folder.

Servers use software to access and manage files. This software can access your website data, which can be stored locally on your computer if the site is self-hosted, or it can be on another computer.

If you have a local server installed, the folder permission problem is likely to occur. Permissions are usually handled by the hosting company. However, if this is the case, you will need to configure the permissions yourself to ensure the safety of your files. That is why the “Installation failed: Could not create directory”. error message occurs frequently.

Usually, a set of numbers dictates who can use which directories. Previously, with the first option, numbers like 755 and 644 were used to handle permissions. These numbers tell the server what licenses exist for specific files and folders. When installing plugins with WordPress, the server will need access to your folders. For this, they will need your permission.

These digits are not just random numbers, but are, in fact, a set of “instructions” that grant permissions to the server. The first digit tells the software what the account user can do with the files, the second specifies what the group can do, and the third tells us what everyone else can do.

Permission management is essential to correct the “Installation failed: Could not create directory”. error. Hopefully, you can fix the problem with these options.

Read more: How to fix the “Sorry, this file type is not permitted for security reasons” error in WordPress

6 Ways to Fix the error installation failed: Could not create directory

Part 1: Overview of Error 0x80070570

Installation failed: Could not create directory – The error 0x80070570 is related to Windows 7, 8, and 10. Mainly, it occurs during a Windows installation process and says “Windows cannot install the required files. The file may be corrupt or unreadable.”

A corrupt storage system is one of the main reasons behind this problem. This stops the installation process in the middle and users should take some preventative measures by cleaning the drive. Later, you can try to access the files or install the firmware again. The error can also occur when accessing certain files in Windows. The following are some of its main symptoms:

Part 2: Fix “The File Or Directory Is Corrupt and Drive C Cannot Be Read”

Installation failed: Could not create directory – As you know, when we get error code 0x80070570, we can no longer access certain files. To find out how to fix error code 0x8007057, you can consider the following options. If one of these solutions doesn’t work, you can try another and get the best results.

Solution 1: Move your files to a different directory

One of the main reasons for getting error 0x80070570 is having corrupted storage. The easiest way to fix this is to move the inaccessible files to some other location. In this way, you can also check if error 0x80070570 occurs due to some corrupted storage or unreadable files.

1. First of all, open My Computer and find the location/files that you cannot access.

2. Right-click on the folder or files that you cannot access and copy or cut them. Now, go to any other drive (or an external source) and paste your data.

3. You can also drag and drop your files or right-click and choose the “Send to” function.

4. At the end, visit the new location where you have moved the files and try to access them again.

If you can access your files from the new location, there is a problem with your hard drive and you should fix it.

Solution 2: Check Hard Drive by Properties

Even if your C drive has been damaged, you don’t have to take any drastic action to fix it. This is because Windows offers several solutions to repair a damaged hard drive on its own. One of the simplest and most effective ways is Windows’ native error checking feature. If you want to learn how to repair a damaged C disk, follow these basic steps.

1. First, start Windows Explorer and go to My Computer from where you can select the C drive icon.

2. Now, right-click on the C drive icon and go to its Properties.

3. In the Tools tab, you can see a function for “Error Checking”“. Just click the “Verify” button here. If you are not logged in as an administrator, you must enter the details of the administrator account.

4. Just wait a few minutes as Window will check the C drive and remove all sorts of minor issues related to it.

Solution 3: Scan the disk for errors by CHKDSK

Installation failed: Could not create directory – If the normal error checking process cannot resolve the error 0x80070570, you can also take the help of the CHKDSK command. The Check Disk utility is a part of the native Windows command tools that can check a disk and fix it in various scenarios. To find out how to fix the error: the file or directory is corrupted and unreadable, the following steps can be followed.

1. Go to the Start menu in your Windows and search for Command Prompt. Now, run it on your system as administrator. You can also start the Run prompt and enter the “cmd” command to open it.

2. Now, there are different ways to run the CHKDSK command utility. The easiest way is to simply type the command followed by the letter of the drive you want to verify.

3. Also, you can add the “/ f” parameter to fix the problems or the “/ r” parameter to repair the files. So the syntax to fix C drive would be – chkdsk c: / f

4. Once you enter the command, Windows will begin to repair the disk. Just wait a few minutes for the operation to complete.

Solution 4: Disk Startup Repair

Installation failed: Could not create directory – If there is a serious problem with your system’s C drive, you can also take Windows Startup Repair assistance. It is a part of the advanced startup function that provides other options related to system recovery and repair. Windows 7, 8, and 10 users can access the Startup Repair option in the same way. However, there would only be slight changes to the overall appearance of the interface. To run Startup Repair and fix error code 0x80070570, follow these steps:

1. First of all, you must start your system in advanced boot mode. The easiest way to do this is by visiting your Settings> Update & Security> Recovery and click the “Restart Now” button under the “Advanced Startup” option.

2. Alternatively, you can also press the Shift key on your keyboard and go to the Power options to reboot your system.

3. Once the computer restarts in advanced startup mode, you will get different options on the screen. Just navigate to Troubleshoot> Advanced Options and click on the “Startup Repair” function.

4. This will start the system repair process. Now you can wait a while as Windows would fix the startup options and other firmware components.

Solution 5: Disable Antivirus Software

Installation failed: Could not create directory- It may surprise you, but sometimes Windows’ firewall or a third-party antivirus tool can also block some system components. As a result, it leads to the unavailability of certain files. For example, if you are trying to access some important system files, this could be one of the problems due to their unavailability. The good news is that you can easily disable the antivirus feature and try to fix the error 0x80070570 this way.

1. If the native Windows firewall is enabled, you can disable it for a while. To do this, just visit the firewall settings (Windows Defender) and disable them.

2. In the same way, access the settings of any third-party antivirus tool such as Avira, Avast, Norton, Quick Heal, McAfee, etc., and disable it. Most of the time, we can do it from its shortcut on the taskbar.

3. If you can’t find the option here, start the antivirus application. From its settings, you can now disable the firewall from now on.

4. Once done, reboot the system and try to access the unavailable files again.

Solution 6: Format the Hard Drive

Installation failed: Could not create directory – If nothing seems to work, then you can consider formatting your hard drive as well. Ideally, this should be the last resort as it will delete all existing data on your hard drive/partition. It is recommended not to format the system partition, as it would also erase essential components of the firmware. However, you can format any secondary partition and learn how I fix error code 0x80070570 as follows.

1. There are different ways to format a partition in Windows. The simplest solution would be to select your My Computer icon and choose the “Format” option by right-clicking on it.

2. This will open a pop-up window to format the partition. If you wish, you can also change the drive’s file system from here. Make the appropriate selections and click the “Start” button.

3. Since this will erase the hard drive, you will receive a confirmation message like this. Accept this and wait a moment as the drive will be formatted.

4. Alternatively, you can also go to Control Panel> Computer Management and launch the Disk Management application. From here, you can also select the drive, right-click, and format it.

Read more: Blank white screen in wordpress? Dont panic: We have a solution!

Part 3: Fix Error 0x80070570 Without Losing Data

Installation failed: Could not create directory – While most of the techniques mentioned above will allow you to fix error 0x80070570 without losing anything, some of them may end up deleting your important files. If you don’t want to suffer an unexpected data loss, use a professional data recovery tool like Recoverit Data Recovery. The tool is quite easy to use and will allow you to extract all kinds of photos, videos, audio, documents, etc. from your hard drive. You can also scan external hard drives, SD cards, USB drives, and other sources as well. As it would allow you to preview your data, you can select the files you want to recover beforehand.

Step 1: Select a drive to scan

Install the Recoverit Data Recovery application on your computer when you want to extract any missing or unavailable content. On its home page, you can see various partitions, external drives, and folders available. You can select any drive from here and even search for a specific folder that you want to scan.

Step 2: Start the scan

Once you select a location to scan, simply click the “Start” button. The app will scan the font and also let you know the progress. If you want, you can stop the process in the middle. However, it is recommended to allow it to be complete for the best results.

Step 3: Restore your files

That’s it! Once the scan is done, all the extracted data will be displayed on the interface. You can switch between these folders from the sidebar and preview them in the interface. In the end, just select the folders and files you want to save and click the “Recover” button. This will allow you to save your data in the location of your choice.

In this way, you can restore all kinds of deleted files from a hard drive. To make sure you never lose your files again, consider saving them to a reliable location this time.

Read more: How to fix wordpress database connection

Part 4: How to Avoid Error 0x80070570

Installation failed: Could not create directory – Now when you know how to fix corrupted folder in Windows 7/8/10, you can easily recover your data. However, it is better to avoid the occurrence of error 0x80070570 than to resolve the situation afterward. If you want to take some preventative measures, first understand the causes of error code 0x80070570.

Causes for getting error 0x80070570

  • The file system has been corrupted
  • A bad sector on the hard drive
  • The system has been infected by malware
  • The data has been infected or is no longer available
  • The computer restarted or shut down while certain files were still being accessed in the background.
  • The files you are trying to access have been deleted or are no longer available in that location.
  • The system memory allocation table has been compromised.
  • There has been an unexpected change in the system registry
  • . The system cannot process the data or your partition type.

Tips to Protect Your Files

This concludes our extensive guide on how to repair a damaged C disk or resolve the infamous error code 0x80070570. As you can see, there are tons of solutions to fix error 0x80070570 that would help you get over it in no time. However, if you don’t want to lose your data while fixing it, consider using Recoverit. A highly professional data recovery tool, known for its exceptional results and it will certainly come in handy in any emergency data loss scenario.



For website maintenance service contact us.

By Rebecca
Rebecca is an Independent content writer for breldigital, She writes content on any given topic. She loves to write a case study article or reviews on a brand, Be it any topic, she nails it