Fixing "Could not create directory" in WordPress
Ce contenu n’est pas encore disponible dans votre langue.
WordPress shows “Could not create directory”, “Installation failed” or “Unable to create directory wp-content/uploads/…” when it can’t write files to your hosting account. Check these causes in order.
1. Your disk space is full
Section titled “1. Your disk space is full”This is the most common cause. In cPanel, check Disk Usage in the sidebar, or open Disk Usage under Files.
If you’re at or near your limit, free up space:
- delete old backups, especially
.zipand.tar.gzfiles in your home folder andpublic_html - empty full mailboxes or delete old email
- delete large
error_logfiles and unused WordPress installations or staging copies
Or upgrade to a bigger plan in the client area.
2. Folder permissions are wrong
Section titled “2. Folder permissions are wrong”WordPress needs to write to wp-content and the folders inside it.
- In cPanel’s File Manager, open your website’s folder.
- Right-click wp-content, choose Change Permissions, and set it to
755. - Do the same for
wp-content/plugins,wp-content/themesandwp-content/uploads.
Files should be 644. Never use 777: the server blocks it for security.
3. Files are owned by the wrong user
Section titled “3. Files are owned by the wrong user”After moving a site from another host, some folders can end up owned by another user, so WordPress can’t change them. If permissions look right but the error continues, open a support ticket and ask us to fix the file ownership for your website’s folder.
4. WordPress is asking for FTP details
Section titled “4. WordPress is asking for FTP details”If WordPress asks for Connection Information (FTP details) when you install a plugin, it can’t write files directly. Add this line to wp-config.php, above /* That's all, stop editing! */:
define( 'FS_METHOD', 'direct' );5. The uploads path is wrong
Section titled “5. The uploads path is wrong”After moving a site, WordPress may try to save uploads to the old server’s path. In wp-config.php or Settings → Media, remove any custom uploads path such as /home/olduser/public_html/wp-content/uploads, so WordPress uses the default.
Related articles
Section titled “Related articles”Cette page vous a-t-elle aidé ?
Merci pour votre retour.