You are currently viewing How to Fix “Installation Failed: Could Not Create Directory” Error in WordPress

How to Fix “Installation Failed: Could Not Create Directory” Error in WordPress

WordPress is a widely used Content Management System, building a WordPress website is a very simple process. Errors such as “Installation failed: could not create directory” can prevent you from providing a key feature or functionality on your WordPress site. It can slow down your work and create serious inconveniences for both you and your users. Fixing this WordPress error can be a daunting task for an individual because there’s no single fix for many of them. And so, you’ll need to troubleshoot for the actual reason behind the issue to resolve it. 

In this tutorial, we’ll discuss what causes this error and other issues related to it. Then we’ll walk you through the important methods for resolving the “Installation failed: could not create directory” error so that you can complete your installation or update.

What Is the “Installation Failed: Could Not Create Directory” Error?

It’s an issue related to file permission. It happens due to improper site configurations and permission settings in WordPress. WordPress cannot create a folder/directory for your plugin or theme if your file permissions aren’t configured and set correctly. Sometimes this error comes when you’re updating your plugin/theme or uploading image files. However, the main reason is the same in all cases, and you can fix it with the same troubleshooting methods.

What Causes the “Installation Failed: Could Not Create Directory” Error in WordPress

Here are some main reasons given why this Installation Failed: Could Not Create Directory” Error occurs in WordPress-

1. Incorrect File Permissions

    If your website hosting provider implemented any security measures to protect your server and website directories from unauthorized changes, it might restrict your ability to modify the server and site framework. To fix this issue, ensure that you have the correct permissions for file setup. Moreover, allow plugins or themes to handle adding new versions and removing old ones during updates. Incorrect file permissions for the wp-content directory or its subfolders can lead to the ‘Installation Failed: Could Not Create Directory’ error in WordPress.”

    2. Insufficient Disk Space 

      In WordPress sufficient disk space is essential to store its files, encompassing plugins and themes. When the server is running low on disk space, it may face challenges in creating new directories for installations. Sometimes this problem occurs due to the presence of outdated backup files. To address this issue, check your disk usage directly in your WordPress dashboard. If it turns out that insufficient disk space is indeed the culprit, contemplating an upgrade to a different hosting package with more extensive storage capacity is a feasible solution.

      3. New Theme Or Plugin Installation Issue

        You can add a theme or plugin to your WordPress site, when you add a new theme or plugin it creates a new folder in which its files are stored. If the plugin or theme doesn’t have permission to write to the root directory of your website, it is not able to complete this task, you’ll see an error such as “Installation failed: could not create directory.”

        By displaying this error, the server indicates that adding the new plugin or theme to your website is not allowed. Generally, this problem occurs on newly developed WordPress sites.

        4. An Existing Plugin Or Theme Updation Issue

          It is also common to see an error when attempting to upgrade a WordPress theme or plugin that already existed on your site. It usually displays, “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.

          5. Uploading Files Directly to The wp-content Directory

            Hosting providers implement server permissions as a security feature to prevent unauthorized parties from making changes to your website. However, if these permissions are configured incorrecty, they can lock you out of your own files. Even if you try to upload plugins or themes directly to the wp-content directory on your server to bypass the ‘Installation failed: could not create directory’ error in your WordPress dashboard, the issue may persist.  

            How to Fix “Installation Failed: Could Not Create Directory” in WordPress?

            Let’s have a look at some troubleshooting methods and techniques to fix and avoid issues related to creating a directory in WordPress.

            1. Create a Backup

              First of all, create a backup for your whole website, if something goes wrong during the process, you can restore it to the way it was. You can create a backup for your WordPress site using a hosting backup, a WordPress plugin, and a manual method. 

              2. Update Folder Permissions With cPanel

                The Folder permissions depend on the rights that each user has. Each server will have permission to read, write and execute. These will depend on the permission levels based on user permissions. For this, you need cPanel access. Here are the steps that you should follow.

                • Login to your cPanel account.
                • Search for “file manager” and navigate to the “public.html.”
                • Select all files under the root directory, right-click, and open “file permissions.”
                • Under the “permissions” button at the top of the page, click on the “change permissions” option.
                Update Folder Permissions With cPanel
                • Then, a dialog box will open. Under the numeric value field, enter the number “755”. Next, check the “Recurse into subdirectories.” checkbox and select the “Apply to directories only.” Now Click on OK and wait for the FTP client to finish the process.
                Update Folder Permissions With cPanel
                • The next step is to select all files under the root directory once again and right-click, select “File permissions.”, and again a dialog box will open.
                • This time you have to enter “644” under the numeric value field. Click on “Recurse into subdirectories.”, and select “Apply to files only.” and Confirm the changes.
                • Finally clear the browser cache and try to install a new theme or plugin,  or update an existing plugin or theme. Now, the “Installation failed: could not create directory” error message or “Update failed: could not create directory” should not occur again, and you should be able to install and update plugins and themes going forward.

                3. Configure FTP Permissions In The “wp-config.php” File

                Configuring FTP Permissions in the wp-config.php file using is another way to resolve this error. If the steps given above were unsuccessful, try to change the FTP permissions by configuring the “wp-config.php” file. This option can fix the error message, as your server might not have permission to write new files. This is why the operation fails each time, and you can change it by configuring the “wp-config.php” file.

                To do so, Simply follow these steps to fix the “Installation failed, could not create directory.” error.

                • Open the “File Manager” in your hosting account.
                • Find the “wp-config.php” file  in the root folder and open it.
                • In your “wp-config.php” file, enter the following passage of code.

                define(‘FS_METHOD’, ‘ftpext’);

                define(‘FTP_BASE’, ‘/pathtorootofyourblog/’);

                define(‘FTP_USER’, ‘ftpusername’);

                define(‘FTP_PASS’, ‘ftppassword’);

                define(‘FTP_HOST’, ‘’);

                define(‘FTP_SSL’, false);

                • Now save the “wp-config.php” file and go back to your dashboard and try to install the plugin or theme once again. This time, it should be done without any issues.

                4. Disk Space Optimization

                  As we have mentioned, sometimes this error may occur due to low or insufficient disk space. So, you need to monitor your server specs and check the memory section. If your server memory is full, you should scale your server size or run a disk optimization to help you in deleting unnecessary files and folders. This creates space for your plugin/theme installation.

                  5. Monitoring Error logs

                    This is another option for fixing “Installation Failed: Could Not Create Directory” error that involves checking your server’s error log. This error log serves as a record detailing errors occurring on the server that hosts your site. It is recommended to regularly review and keep an eye on both application access and error logs. 

                    Most WordPress hosting providers include log monitoring on their platform. This error log also can be accessed using the cPanel.

                    • For monitoring using cPanel login to your account and navigate to File manager.
                    • Next, navigate to the public_html.
                    • Now right-click on the error_log file and select View/Edit.
                    • The error log provides insights into server issues like misconfigured file permissions or insufficient storage, potentially leading to the installation error.

                    It’s a good practice to consistently view and monitor your application access and error logs. You can view the process details for every running request and error. 

                    6. Contact Our Experts

                      If all above mentioned steps are not working and you are still facing the issue, contact our WordPress experts they will definitely help you in fixing this error. If you’re not sure about making potentially harmful changes to your site, it’s best to contact an expert. Contact SupportFly’s WordPress Experts, they will help you in making code changes and look deeper into the issue.

                      Choose SupportFly For Premier WordPress Management Services

                      Managing a WordPress website is full of numerous responsibilities and risks from regular updates and security checks to optimize smooth performance and ensure seamless user experiences. Fixing the errors like “Installation Failed: Could Not Create Directory” can be a daunting task for you, but with a systematic way and approach, these issues can be resolved effectively or leave it all to us and get relaxed.

                      SupportFly offers WordPress management services that play a crucial role in maintaining the health and security of a website. These services include:

                      1. WordPress Consulting

                        SupportFly WordPress Consulting services provide 24/7 expert guidance and strategic advice to help you make the most of your WordPress website. Whether you’re just starting or looking to enhance your existing WordPress implementation, our consultants offer valuable insights tailored to your unique needs.

                        2. WordPress Implementation

                          Our team of experienced developers and designers work closely with you to bring your WordPress website to life. We handle all aspects of implementation, including theme selection, customization, plugin integration, responsive design, and seamless migration from your existing platform to WordPress.

                          3. WordPress Managed Services

                            Our WordPress Managed Services take the burden off your shoulders, allowing you to focus on your core business activities. We handle all the technical aspects of WordPress management, including regular updates, security monitoring, performance optimization, backups, and troubleshooting.

                            Utilizing SupportFly’s professional WordPress management services can significantly reduce the burden on site administrators, allowing them to focus on content creation and business growth while experts handle the technical aspects. This ensures that your website remains secure, performs optimally, and provides a reliable experience for your visitors.


                            We hope this tutorial helped you to understand what the “installation failed: could not create directory” error is and how to fix the file permission issue so that you can prevent this error. In this guide, we have provided not only the main reasons for this error but also the steps to fix this issue. Still if you have any questions feel free to contact us. Our expert team is eagerly waiting for your doubts.