Fix the “Installation Failed: Could Not Create Directory.” Error in WordPress
Errors on your WordPress site can stifle your productivity and cause major headaches for both you and your visitors. For example, the notice “Installation failed: could not create directory” can prohibit you from delivering a critical feature or service.
Check out how Kinsta compares against the competition.
Choose a service provider.
Fortunately, correcting this problem is pretty straightforward. You can simply get your WordPress plugin or WordPress theme up and running in no time by modifying a few parameters.
We’ll talk about what causes this mistake and how to fix it in this post. Then we’ll show you three ways to fix the “Installation failed: could not create directory” notice so you can finish your installation or upgrade.
Let’s get this party started!
What Causes the “Installation Failed: Could Not Create Directory.” WordPress has an error.
There are three main scenarios in which the “Installation Failed: Could Not Create Directory.” problem in WordPress can occur:
When using the WordPress dashboard to install a theme or plugin,
During the installation of a standard theme or plugin
While attempting to upload files to your server’s wp-content directory
Each scenario has the same core cause of the problem. Let’s take a closer look at each of these scenarios one by one.
Installing a New Plugin or Theme on Your Website
Your WordPress site is made up of two parts: a database and various files saved in ‘directories’ on a server. When you use WordPress admin to install a theme or plugin, it must establish a new directory in which to save its files.
However, if the plugin or theme you’re trying to install doesn’t have write permission to your website’s root directory, it won’t be able to finish the job. You’ll get an error message like “Installation failed: could not create directory” at that point.
This error is your server’s way of telling you that adding the plugin or theme in question will cause changes to your site’s files. In general, this is a problem that happens most frequently on newly created WordPress sites.
It’s worth noting that this mistake can also be caused by an other, less common cause. If your server runs out of disk space to hold your site’s files, it may display this notice, indicating that there isn’t enough place for the new plugin or theme. Check out this tutorial to see how much space WordPress takes up on your hard drive.
This could be because outdated backup files haven’t been erased, or it could be because your hosting plan isn’t big enough for your site. In the latter instance, you’ll want to consider upgrading to a more storage-friendly hosting service.
Kinsta offers a Disk space add-on in increments of 20 GB. More information can be found here.
Updating an Existing Plugin or Theme
When attempting to upgrade an already installed WordPress theme or plugin on your site, you may encounter an error similar to the one shown above. “Update failed: could not create directory,” it would usually say.
This issue arises for the same reasons as the error “Installation failed; directory could not be created.” WordPress needs to rewrite its files on your website’s server when you upgrade a plugin or theme. The procedure will be unable to access the relevant files or upload new ones if your permissions settings are incorrect or there is insufficient free space.
Because the causes of these two problems are the same, the solutions are also the same. Any of the options described below for fixing the “Installation failed: could not create directory” error should work for a stopped update as well.
Files to be uploaded to the wp-content directory
Server file permissions are a security measure implemented by hosting providers to prevent unauthorized parties from altering your site or stealing important data.
However, if they aren’t established appropriately, they might sometimes keep you out of your own files.
This is why, if you try to bypass the “Installation failed: could not create directory.” error in your WordPress dashboard by uploading the plugin or theme’s files directly to your server’s wp-content directory, you’ll almost certainly run into the same issue. The error is caused by a server issue, not by a problem with your WordPress installation.
This problem could also affect your wp-content/uploads subdirectory, which contains all of your media assets. Adding photos, videos, and other types of material to your site by saving it to your server is analogous to installing a new plugin or theme.
Uploading content to wp-content/uploads will still result in the problem we’ve been discussing if you don’t have write rights in your root directory. To repair that, you’ll need to make some changes to your server’s settings, which we’ll go over momentarily.
Diagnosing the “Installation Failed: Could Not Create Directory.” Error in WordPress (2 Methods)
The good news is that this inaccuracy is relatively simple to correct. Most of the time, simply correcting your permissions will solve the problem. However, before you begin working on that solution, double-check that it will address your problem.
Two approaches for determining whether your site is suffering a permissions-related error are explained below.
1. Make use of the WordPress Site Health Checker.
The Site Health tool was added in WordPress 5.2. It has a lot of useful information about your WordPress site, like performance test results, security checks, and WordPress configuration data.
You can find it in your WordPress dashboard by going to Tools > Site Health. To verify your file rights settings, go to the Info tab and select:
Do you want to discover how we grew our traffic by over 1000%?
Join the 20,000+ people who receive our weekly email with WordPress insider secrets!
Now is the time to subscribe.
The WordPress Site Health tool is a useful tool for WordPress users.
Then scroll down to the last section, Filesystem Permissions:
permissions on the filesystem
The WordPress Site Health Info tab is where you can find out more about your site’s health
A list of important WordPress files, including the plugin and theme directories, may be found here. They should all be rated as “Writable” in the ideal world:
The Filesystem Permissions check in WordPress Site Health
If your permissions aren’t set up correctly, you’ll see “Not editable” next to the folders that aren’t working. If this is the case, you’ll need to change the permissions on your files.
2. Check the Error Log on Your Server
Another alternative is to look through the error log on your server. This method may be more efficient because it will display all issues, not simply wrong file permissions. Your logs should be accessible through your hosting account.
If you’re a Kinsta customer, go to your MyKinsta dashboard and select Sites from the left-hand menu:
Sites with the Kinsta dashboard
Dashboard for MyKinsta
Select the name of the site where the “Installation failed: could not create directory” problem is occurring. After that, go to the Logs tab:
log of mykinsta errors
Error Log viewer for myKinsta account
Make sure error.log is selected from the drop-down menu. You should be able to view any recent issues on your server here, such as wrong file permissions or insufficient storage, which could be the source of the installation difficulty.
For your WordPress site, you’ll need lightning-fast, dependable, and totally secure hosting. Kinsta offers all of this, as well as world-class assistance from genuine WordPress specialists, 24 hours a day, seven days a week. Take a look at our plans.
If you observe a relevant problem, you can either fix your file permissions or upgrade your hosting plan if necessary.
How to Fix the “Installation Failed: Could Not Create Directory.” WordPress has an error.
If the “Installation failed: could not create directory error” is caused by your site’s rights settings, you can fix it by resetting them. To do so, you’ll need to use an FTP client to connect to your server via File Transfer Protocol (FTP).
It’s a good idea to make a backup of your site’s files before making any changes, just in case something goes wrong and you need to restore it. Then, from your hosting account, get your FTP credentials.
You may accomplish this as a Kinsta customer by going to the Info tab for your site in the MyKinsta dashboard:
ftp info kinsta
Using MyKinsta to access the site’s FTP credentials
Then, launch FileZilla (or another client) and type in your data. You should now be connected to your server, where you should see a public html subdirectory. To see your WordPress files, double-click on it:
public html ftp
FTP access to the public html directory
If you don’t see all of the files, here’s how to get Filezilla to show hidden files. Select the wp content, wp includes, and wp admin folders after that. Choose File Permissions: from the context menu when you right-click on them.
file permissions on ftp
Using FTP to select the file permissions option
You should see a window with a few options, such as:
window for ftp permissions
Using FTP to set the proper file permissions
Check sure the following values are specified for the options:
Read, Write, and Execute are the permissions granted to the owner.
Permissions for the group: Read and Execute.
Read and Execute Public Permissions.
755 is the numerical value.
Subdirectories should be recursed into.
Only apply to directories.
To close the window, click the OK button. Return to your site and try installing or updating the plugin/theme once more.
It’s worth noting that certain hosting companies, such as those that utilize cPanel, offer their own tools that you can use instead of FTP/SFTP. Logging into your hosting account, going to the site where the problem is occurring, and looking for a File Manager is a common way to access this tool.
Is the error ‘Installation Failed: Could Not Create Directory’ bugging you? Follow these instructions to restore your WordPress site in only a few minutes.
TO TWEET, CLICK HERE
The plugins and themes on your WordPress site provide essential functionality for you and your visitors. When installing or updating one, encountering an issue can put a wrench in your plans and slow down your work.
You can utilize the Site Health tool or look at your server’s error log to see if a file permissions issue is causing a plugin or theme installation error on your site. Resetting your permissions using FTP/SFTP should just take a few minutes after that.
Save time, money, and improve site performance by using:
Expert WordPress hosting assistance is available 24 hours a day, 7 days a week.
Integration with Cloudflare Enterprise.
With 29 data centers across the world, we can reach a global audience.
With our built-in Application Performance Monitoring, you can improve your performance.
All of this and more is included in a single plan that includes no long-term obligations, aided migrations, and a 30-day money-back guarantee. Check out our plans or speak with a sales representative to find the ideal plan for you.