Are you encountering the “Installation failed: Could not create directory.” error in WordPress? You’ve come to the right place for a solution. We will walk you through the causes of this error and provide instructions to resolve it.
Both the “Installation Failed” and “Updating Failed” errors in WordPress stem from similar underlying issues like file permissions and server configurations. Ensuring proper permissions and checking server resources can resolve both problems, ensuring your WordPress site updates and installs correctly.
This error message is relatively common among WordPress users and is typically caused by incorrect file and folder permissions. For WordPress to create a new plugin or theme directory, the file permissions must be correctly configured. If they are not, WordPress cannot create the necessary directories, leading to this error.
If you are using a hosting provider like Azure, make sure you have Azure DDoS protection enabled. This service can help mitigate attacks and ensure your site remains accessible during traffic spikes, which can otherwise cause server overload and related errors.
You might encounter this error in various scenarios, including:
When you add a new theme or plugin, WordPress needs to create a new folder in the root directory to store its files. If the plugin or theme doesn’t have permission to write to this directory, you’ll see the “Installation failed: could not create directory.” error. This issue often occurs on newly developed WordPress sites.

Another less common cause could be insufficient disk space on your server, preventing the creation of new files or folders.
A similar error can occur when trying to update an existing plugin or theme. The error message might read, “Update failed: cannot create directory.” It happens when WordPress needs to rewrite files but cannot due to incorrect permissions or insufficient disk space.

Hosting providers implement server permissions to prevent unauthorized changes. Incorrectly configured permissions can lock you out of your files. Even if you try to bypass the error by uploading plugins or themes directly to the wp-content directory, the problem persists if the server settings are incorrect.

This error is relatively easy to fix. Before diving into the solution, perform a site health check to identify the problem.
WordPress has a built-in health check system that provides useful information about your website’s health. Navigate to Tools > Site Health in your WordPress dashboard, then click on the Info tab.

Scroll down to the “Filesystem Permissions” section. If permissions are not correctly configured, you’ll see “Not writable” next to the problematic folders, indicating that you need to correct your file permissions.

Create a backup of the website before making any changes. It ensures you can restore your backup anytime.
You can use plugins like WP Umbrella for easy backups:


To fix the permissions, you need to use an FTP client like FileZilla. Here’s how:


Install/Update the plugin/them again. As with server settings and permissions for installation failure, it is for fixing media library loading issues; often, the same amount of troubleshooting is required. Preventing these common WordPress errors that we’ve covered can come down to ensuring that your server environment is correctly configured.
If the previous method doesn’t work, you might need to change the FTP permissions through the wp-config.php file. Here’s how:

define(‘FS_METHOD’, ‘ftpext’);
define(‘FTP_BASE’, ‘/path/to/root/of/your/site/’);
define(‘FTP_USER’, ‘ftpusername’);
define(‘FTP_PASS’, ‘ftppassword’);
define(‘FTP_HOST’, ‘yoursite.com’);
define(‘FTP_SSL’, false);
We will help you fix the error in WordPress with this guide. Most often, you’ll trace much of this issue to the wrong file and folder permissions, but with the correct tweaks, you can get back to running your website in no time. Again, remember to back it on a regular basis, and also to monitor the health of your site.
Think about the hosting environment you run WordPress on; will it support high-traffic sites? By hosting your WordPress on high-traffic WordPress hosting, you can optimize resource and configuration settings that can handle high volumes of visitors, thus reducing the chance of such this kind of errors.
By following these steps, you should be able to fix the error and continue installing or updating your plugins and themes without any issues. If you have any questions or need further assistance, feel free to reach out to the WordPress support community.