This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

✨ Vultr and Linode are back on Cloudways! VIEW PLANS→

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

Updated on May 22, 2024

7 Min Read
wordpress installation failed could not create directory

Trying to resolve an “installation failed: Could not create directory.” error in WordPress?

All right! You’re in the right place.

WordPress is a great CMS, and building a WordPress website is simple. But fixing WordPress errors can be a frustrating experience 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 article, I’m assuming that you are fixing the could not create directory error in WordPress on your own.

To do so, follow my instructions carefully. But before diving into the troubleshooting process, let’s try to understand the possible reasons behind a “could not create directory” error.

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

It’s a file permission issue that happens because of improper site configurations and settings. WordPress cannot create a folder/directory for your plugin or theme if your file permission isn’t set correctly.

Sometimes the issue occurs when you’re updating your plugin/theme or uploading image files. The error will then appear as: update failed: could not create directory.

However, the main reason is the same for all cases, and you can fix it with the same troubleshooting methods.

Best WordPress Hosting Starting From $11/Month

Experience the power of managed WordPress hosting with Cloudways! Fast, Secure, and Hassle-Free.

Why Does the “Installation Failed: Could Not Create Directory” Error Occur?

There are two reasons behind the could not create a directory error.

Reason #1: You Don’t Have the Right Permissions

Your hosting may set up some security permissions to protect the server and site folders from unwanted changes. This could deny you the authority to change your server and site structure.

A new plugin or theme creates a directory (with the plugin or theme name) in the wp-content folder during installation.

Proper permission is needed to set up the file structure. Similarly, the plugin or theme needs permission to add a new version and remove outdated ones for the update process.

The permission mode is divided into three parts: write, read, and execute, where each has its numeric value to define the permission for the user, group, and world.

In this article, I will show you how to set permission for your files and folders to avoid this error. For more information on what is recommended for WordPress, go here.

Reason #2: Lack of Disk Space

Sometimes, you may encounter this error due to high memory usage and no disk space. That’s why you’re always recommended to host your websites on a dedicated cloud hosting platform, where you can quickly scale up the server size with a few clicks.

How to Diagnose the “Installation Failed: Could Not Create Directory” Error in WordPress?

To diagnose the “Installation Failed: Could Not Create Directory” Error in WordPress, you can utilize the built-in health check system. This feature provides valuable insights into the overall health of your website and can help identify the root cause of the issue.

  • To access it, simply go to your WordPress dashboard and navigate to Tools > Site Health.

Site Health in wordpress

  • Click on the “Info” tab.

info tab in site health tool in wordpress

  • Scroll down to the section labeled “Filesystem Permissions.”

Filesystem Permissions

  • In this section, all folders should be listed as writable. If any folders are marked as “Not writable,” it indicates that there might be an issue with your file permissions. In such cases, you must correct your file permissions to resolve the problem.

All folders should be listed as writable

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

Let’s look at some troubleshooting methods and techniques to quickly fix and avoid creating directory errors in WordPress.

1. Create a Backup

First, create a backup for your whole website, so if something goes wrong during the process, you can just restore it to the way it was.

You can create a backup for your WordPress site through: a hosting backup, a WordPress plugin, and a manual method. Learn how to back up a WordPress site with this step-by-step guide.

Experience an Error-Free Hosting with Autonomous

No more annoying hosting and limitation errors. With Autonomous, you can enjoy effortless scalability with Kubernetes-based autoscaling, super-fast speeds, and high uptime, ensuring your website remains fast and responsive.

2. Disk Usage Optimization

As I mentioned, sometimes you may encounter this error due to low disk space. So, you need to monitor your server specs and check the memory section.

If your server memory is full, you can scale your server size or run a disk optimization to help you delete unnecessary files and folders. This creates space for your plugin/theme installation.

Cloudways lets you run a disk cleanup through the server management panel in a few clicks.

Cloudways disk cleanup through the server management panel

If your server has enough memory space and you still encounter a could not create directory error, you need to continue troubleshooting.

3. Resetting File and Folder Permissions

I will reset my file and folder permission directly from the Cloudways management panel. If this feature is unavailable on your current hosting, you can skip this method and move to the next step, where I’ve performed the setting file permission process via an FTP client like FileZilla.

reset file and folder permission directly from the Cloudways management panel

The beauty of a managed cloud hosting platform is that it offers all the essential features and is specially designed to provide a hassle-free hosting experience.

On Cloudways, go under the application management panel > application settings > general. Go to reset file/folder permission to reset the file ownership.

Once you click on the reset button, the directories permission will be reset to 774 and the files permission to 664. For more details, check out this piece on resetting files and folder permission.

New Customer? Claim Your 30% Off Cloudways Promo Code

Welcome to Cloudways, where your website finds the perfect hosting solution. Claim your promo code and get 30% off for 3 months on all plans!

4. Setting File Permissions via an FTP Client

  • This step will show you how to change the files and folder permission via an FTP client like FileZilla. If you haven’t already installed the FileZilla FTP client, here’s the download link.
  • First, launch the FileZilla application and provide your server’s access credentials to connect remotely. Go to the public_html folder > right-click (mouse) and click file permissions.

open file permission

  • Set 755 in the numeric value field > select recurse into subdirectories > apply to directories only and click ok.

wordpress folder permission

  • Repeat the same actions for file permission and set 644 in the numeric value field > select recurse into subdirectories > apply to files only and click ok.

wordpress file permission

  • When you set the file and folder permission, clear your cache and try to install/upgrade your plugin/theme again.

5. Monitor Application Logs

It’s 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.

Most reputable WordPress hosting providers offer log monitoring features on their platform, and I hope it’s also available in your case.

Monitor Application Logs in Cloudways platform

If your website isn’t working fine and has issues, this feature will let you know those errors. On Cloudways, there’s a search and filter available to view your last 1000 recent logs. You can also view other HTTP status code logs like 403, 404, 501, and more.

Performance-Focused WordPress Hosting free from all kinds of errors

Set yourself free of all hosting-related tasks and get boosted performance results with our managed WordPress hosting. 3-day free trial (no credit card required)

Summary

I hope this article helped you understand what the installation failed: could not create directory error is and how to fix the file permission issue.

In this guide, I have provided not only the steps to fix this issue but also detailed instructions on how to easily diagnose it using WordPress’s built-in Site Health Checker tool.

If you know another way to resolve this error, please let us know in the comment section below.

Frequently Asked Questions

Q: How can I fix the “unable to create directory” error?

A: There are four ways to fix the installation failed: could not create directory error.

  • Disk Usage Optimization
  • Resetting File and Folder Permission
  • Setting File Permission via FTP Client
  • Monitor Application Logs

You can check out the ‘How to Fix’ part of this article for details.

Q: What causes a “could not create directory” error in WordPress?

A: There are two reasons for the could not create directory error.

  1. Your hosting set up security permissions to protect the server and site folders from unwanted changes, and in the process took away your authority.
  2. It could be due to high memory usage and no disk space.

Q: Why am I getting an “installation failed, could not create directory” error message?

A: The “installation failed, could not create directory” error message in WordPress typically occurs due to issues with file permissions or a damaged installer file. When you encounter this error, it means that the WordPress installation process cannot create the necessary directories to complete the installation.

Q: Can a corrupted installer file cause the “could not create directory” error during installation?

A: Yes, the “could not create directory” issue during installation is often caused by a damaged installer file. Ensure that the installer file is not corrupted or damaged and that you have downloaded it from a trustworthy and reliable source.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Farhan Ayub

Farhan is a community manager at Cloudways. He loves to work with WordPress and has a passion for web development. Mostly, he spends his time interacting with the people in the WordPress community. Apart from his work life, Farhan spends his time gaming and playing sports. Feel free to contact him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now