How to Resolve the “Installation Failed Could Not Create Directory.” Error in WordPress

While WordPress maintains its position as the most popular CMS among the developers due to its ease of access, errors on WordPress sites are the most annoying and depressing for many – Not to mention that “installation failed: Could not create directory” and “update failed: could not create directory” are among the most common ones. While it’s not rocket science to resolve this error, it becomes quite an issue for many, especially beginner-level developers or website owners.
One of the very common causes of “Installation failed: Could not create directory error,” is your WordPress website’s permission settings. However, there are a few more reasons why you could potentially fall prey to this.
In this read, we’ll help you learn the 5 minutes easy fix of the “Installation failed: Could not create directory” error in WordPress. But before that, let’s discuss some causes of “Installation failed: Could not create directory” and how you can easily diagnose it.
Related: Fixing The ”Sorry, This File Type Is Not Permitted for Security Reasons” Error in WordPress
What Causes the “Installation Failed: Could Not Create Directory.” Error in WordPress?
Now, typically there are 3 conditions that cause “Installation Failed: Could Not Create Directory.” Error. These conditions are
- Installing a plugin or theme using WordPress Dashboard.
- Updating a plugin or theme.
- Uploading files to the wp-content directory on the server.
Installing A Plugin Or Theme Using WordPress dashboard
One of the reasons why you’re facing the “Installation Failed: Could Not Create Directory.” The error occurs when you install a new plugin or theme using WordPress dashboard. The reason behind this is quite straightforward. The plugin or theme that you’re trying to install on your WordPress site does not have permission to write in your website’s root directory. Therefore, it is not able to complete the installation and shows “Installation Failed: Could Not Create Directory.”
Updating A Plugin Or Theme
Another variation of this error occurs when you try to update an existing theme or plugin on your WordPress site. Here’s what it looks like – “Update failed: could not create directory.”
What happens in this variation of the error is that when you try to install an update to the existing integration, WordPress is not able to rewrite files in your website’s server due to the limited storage or incorrect permission settings. Therefore, it shows the “Update failed: could not create directory.” Error.
Uploading Files To The wp-Content Directory On The Server
The final cause of the “Installation failed: Could not create directory error,” comes around when you try to upload files in the wp-directory. Hosting providers generally put security permissions in order to avoid malware breaches and unauthorized access to your website’s database. Therefore, sometimes when you try to upload themes and plugin files directly to your WordPress site’s server, you see the “Installation failed: Could not create directory” error.
If you focus on all the causes of the “Installation failed: Could not create directory” error on WordPress, you’ll notice that the root cause is pretty much the same in all cases – Incorrect permissions.
Now that you have a clear understanding of what causes the “Installation failed: Could not create directory” error on WordPress, let’s talk about 2 ways of diagnosing it.
How To Diagnose “Installation failed: Could not create directory” Error In WordPress? (2 Simple Methods)
1. WordPress Site Health Tool
WordPress site health is a gem of a tool, having all the valuable information like security checks, site performance, and configuration data.
To diagnose the “Installation failed: Could not create directory” error using the WordPress site tool
- Go to the Tools section in your WordPress dashboard and select Site Health.
- Now click on the Info tab to check your file Permission Settings.
- Drop down the File Permission settings and toggle the permission for each WordPress plugin and theme to Writable.
2. Checkout The Server’s Error Log
Checking your server’s log is a more efficient method to diagnose the “Installation failed: Could not create directory” error. The reason is simple, your logs would display any potential bug or error that may have occurred.
To access your server’s log, you need to access your hosting account. Here’s what you need to do.
- Access your hosting account and navigate to the Logs
- Choose the log from the dropdown menu and here you’ll be to ease any possible errors including the incorrect permissions.
Now you know how to diagnose “Installation failed: could not create directory” error on WordPress; which takes us down to the final point – how to fix “Installation failed: could not create directory”?
How To Fix “Installation failed: could not create directory” Error In WordPress Website?
As we’ve mentioned above that the root cause of “Installation failed: could not create directory” error on WordPress is your incorrect website permissions, therefore, it can easily be solved by resetting the site’s performance. Here’s how you can easily fix this error.
Before you start troubleshooting “Installation failed: could not create directory” error, it is important to backup your website data so that you can recover it in case of any unfortunate case.
Related: How to Put WordPress in Maintenance Mode
- Connect to your server using your FTP credentials and access public_html
- Now, select the folders labeled as wp_content, wp_includes, and wp_admin.
- Right click on the folders and select File Permissions.
A window will appear with multiple settings. In this window, you’ll need to make sure that following permissions are set to these values.
- Owner Permissions: Read, Write, Execute.
- Group Permissions: Read, Execute.
- Public Permissions: Read, Execute.
- Numeric value: 755.
- Recurse into subdirectories.
- Apply to directories only.
Once you’ve set these settings, click on the Ok button and return to your site. Refresh your site and try installing a plugin or theme. You’ll see that the “Installation failed: could not create directory” error on WordPress is gone.
Conclusion
WordPress is a go to place for those who want to start their development career. However, it is a home to many major and minor bugs and errors at the same time. In this read, we’ve helped you learn how to fix “Installation failed: could not create directory” error easily.
You can also read our other guides on topics like Fixing 405 Method Not Allowed Error on WordPress and Fixing The”Sorry, This File Type Is Not Permitted for Security Reasons” Error in WordPress to troubleshoot errors in the runtime.