Proudly Hosting over 100,000 Fast Websites since 2010

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

How to Fix the “Installation Failed_ Could Not Create Directory.” Error in WordPress

Encountering the “Installation Failed: Could Not Create Directory” error means WordPress cannot create a necessary directory on your server during the installation process.

While confusing at first, this error can typically be resolved with a few simple server tweaks. In this guide, we’ll walk through the most common causes of the “could not create directory” error and how to fix them so you can complete the WordPress installation.

What Causes the “Could Not Create Directory” Error?

This error occurs when the WordPress installation script tries and fails to create important directories on your web server. This is often caused by incorrect file permissions.

The most common directories that have issues during installation are wp-content and uploads. WordPress requires write access to these folders to work properly.

If your server’s file permissions are too restrictive, the WordPress installation cannot create and write to these directories, resulting in a failed install with this unhelpful error message.

Troubleshooting and Fixing the “Installation Failed: Could Not Create Directory” Error in WordPress

Confirm the Parent Directory Permissions

The first thing to check is whether the parent directory where WordPress is being installed has the proper permissions set.

Using FTP or your hosting control panel, navigate to the parent folder WordPress was installed to, usually public_html or www. Check that the permissions are set to 755, 775, or 777.

If that parent folder has restrictive permissions like 700 or 744, the WordPress installer will not be able to create the wp-content and uploads folders within it. Update the parent directory permissions first.

Set wp-content Permissions to 755

Once the parent directory permissions are confirmed, check the wp-content folder.

The proper permissions for wp-content are 755. This gives the server full read/write access while restricting broader access for security.

If wp-content permissions are more restrictive at 744 or 700, update them to 755. This ensures WordPress can write files, like those uploaded to Media, to this directory.

Check the Uploads Folder Permissions

The other problematic directory is usually uploads. This folder hosts all uploaded media files.

Like wp-content, uploads should also have permissions of 755 for a balance of write access and security. Set the uploads directory to 755 if it is currently more locked down.

With proper 755 permissions on both of these critical folders, the “could not create directory” errors should be resolved.

Confirm Ownership of WordPress Files

In some cases, permission issues arise not from overly restrictive settings but from invalid ownership.

All WordPress files should be owned by the primary hosting account username. This grants that account full read/write control.

Check for ownership flags like 644 on files, indicating an invalid user. Use your FTP client or hosting control panel to assign ownership of all WordPress files and folders to your hosting account username.

Correct file ownership ensures your account has the proper access to create, modify, and delete WordPress directories like wp-content and uploads.

Disable the Open Basedir in PHP

Some web hosts run PHP with open_basedir enabled for security. This can cause permissions-like issues for WordPress.

Open basedir restricts PHP file access to specified directories. If WordPress directories are outside that set path, the installer cannot create or write to those folders.

Check with your host to disable open basedir restrictions for your account. Alternatively, you may need to move your WordPress installation within the approved open basedir path.

Increase PHP File Size Limits

Another potential roadblock is if your PHP file size limit is too low. WordPress may try to write files exceeding that limit, causing a failure.

Check your php.ini file and increase the upload_max_filesize, post_max_size, and memory_limit directives. Values of 256M or higher are recommended.

Bumping PHP file size limits gives WordPress enough overhead to write installation files without hitting restrictive caps.

Change Installation Folder Path

In rare cases, the directory path where you are installing WordPress could be too long for the server’s file system.

Try installing WordPress in a shorter path like /WordPress instead of a nested subfolder. Or move the installation up to the root rather than buried in sub-directories.

This eliminates extremely long directory paths that may cause issues creating folders like /public_html/sites/ Lengthy paths can fail on some hosts.

Check for Pre-Existing Directories

If you are migrating an existing WordPress site or reinstalling it, be sure to delete old directories first.

If the wp-content or uploads directories already exist from a previous install, the installer may fail when trying to create them again.

Manually delete these folders before re-running the WordPress installation. This clears the way for brand-new directories to be built.

Create Folders Manually

As a workaround, you can manually create the wp-content and uploads folders at the proper location with the correct 755 permissions.

Then run the WordPress install again. Since those directories already exist, it will skip that step and hopefully proceed.

This can help isolate whether an error creating the directories themselves is tripping up the installer when all else is configured correctly.

Contact Your Web Host for Assistance

If you still receive “could not create directory” errors after exhausting the above checks, reach out to your web hosting provider’s technical support team.

Provide them with the specific directory causing issues, the installation path you used, current folder permissions, and any other details about the environment.

Many hosting companies are familiar with addressing this WordPress installation error and can spot configuration problems like PHP settings or restrictive policies on their infrastructure preventing directory creation.

With guidance from your host’s support team, the real cause of the directory creation failure can be identified and corrected so you can complete the WordPress installation.


The generic “could not create directory” error during WordPress installation is frustrating but fixable. In most cases, adjusting folder permissions, ownership settings, or PHP file limits resolves the problem quickly.

Carefully check each directory, validate permissions are 755 for critical folders, verify your hosting account has full ownership, and tweak open basedir and PHP limits as needed.

With a clear understanding of which environment settings commonly contribute to this error, you can methodically isolate and correct the specific factor blocking your particular WordPress install or upgrade.


Leave a Reply

Your email address will not be published. Required fields are marked *