Are you trying to fix the “installation failed: Could not create directory.” error on WordPress?
Great! You’ve come to the right place.
“Installation failed, could not create directory.” is a relatively common error message that many WordPress users encounter.
Throughout this post, we’ll examine what causes this error and other issues associated with it.
Then we will show you how to resolve the “Installation failed: could not create directory” error message so that your installation or update can be completed.
Let’s get the troubleshooting started!
Table of contents
This error may occur due to an incorrect configuration of your WordPress file and folder permissions. File permissions must be set correctly in order for WordPress to create a plugin directory or theme folder.
In all cases, the underlying cause is the same and you can resolve it using the same troubleshooting methods.
You might encounter the “Installation Failed: Could Not Create Directory.” error in WordPress in the following situations:
You can add a theme or plugin to your WordPress site, it creates a new folder in which its files are stored when you add a theme or plugin.
Nevertheless, if the plugin or theme doesn’t have permission to write to the root directory of your website, it won’t be able to complete this task. When this happens, you’ll see an error such as “Installation failed: could not create directory.”
By showing you this error, your server is telling you that adding the plugin or theme to your site is not allowed. Generally, this problem occurs on newly developed WordPress sites.
It’s important to note that there is a similar, less common cause for this error. If your server is running out of disk space to store your site’s files, it may show this same message because it has no room for the new plugin or theme.
It is not uncommon to see an error very similar to the one we described above when attempting to upgrade a WordPress theme or plugin that has already been installed on your site.
It usually says, “Update failed: cannot create directory.”.
The causes of this problem are similar. Whenever you update a plugin or theme, WordPress needs to rewrite its files on the server. If you don’t have enough space or your permissions are incorrect, the process will not be able to access or upload the right files.
Both issues have the same cause, therefore, their solutions are also the same.
We will come to it in the paragraphs.
Hosting providers implement server permissions as a security feature to prevent unauthorized parties from making changes to your site.
Nevertheless, if they are not configured correctly, they can lock you out of your own files.
Thus, even if you upload plugins or themes directly to the wp-content directory on your server to get around the “Installation failed: could not create directory.” error in your WordPress dashboard, the problem will likely persist. The problem is not with your installation of WordPress, but with your server.
You will need to adjust your server’s settings to fix the problem.
Fortunately, this error is relatively easy to fix. It is important, however, that you check whether that solution is capable of solving your problem before you start working on it. So let’s go to the WordPress health check section of your site.
WordPress has a native health check system. Within it, you will find a wealth of useful information about the health of your website.
From your WordPress dashboard, navigate to Tools > Site Health and click on info.
Finally, scroll all the way down to the last section “Filesystem Permissions”.
All should be listed as writable. You will see “Not writable” next to the problematic folders if your permissions are not configured correctly. Then your file permissions need to be corrected.
We will show you how!
The first step is to create a backup of your entire website so that if anything goes wrong, you can restore it back to its original state.
You can easily create a backup of your website with WP Umbrella.
Install WP Umbrella from your WordPress admin, activate the plugin and create an account.
Then go to WP Umbrella’s application, click on your project and go to the backup tab.
From here, click on backup now and wait for your backup to be ready! Now let’s troubleshoot this!
In order to connect remotely, you need to launch the FileZilla application and provide your server’s credentials.
Next, right-click (mouse) on the public_html folder and then, select the folders wp_content, wp_includes, and wp_admin.
Right-click on them and choose File Permissions:
Make sure the following options are set:
You can now try to install or update the plugin/theme again on your website.
In case the first option does not work, you might try changing the FTP permissions through the “wp-config.php” file. It is a very simple process.
define(‘FS_METHOD’, ‘ftpext’); define(‘FTP_BASE’, ‘/pathtorootofyoursite/’); define(‘FTP_USER’, ‘ftpusername’); define(‘FTP_PASS’, ‘ftppassword’); define(‘FTP_HOST’, ‘yoursite.com’); define(‘FTP_SSL’, false);
Please ensure the information in brackets is replaced with yours.
Go back to your dashboard and try again to install or update the plugin. Everything should work this time.
We hope this article helped you to fix this WordPress error.
In this article, I’ll show you how to easily turn off PHP errors in WordPress.
Step-by-step guide to help you fixing the folder and file permissions issue in WordPress.
The 500 internal server error on WordPress is probably one of the worst you can get because your entire site is down. The 500 internal server errors are very often the consequence of an error in the PHP code.