请选择 进入手机版 | 继续访问电脑版

桐木舟学英语人工智能

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 191|回复: 0

WordPress无法插入图片 Unable to create directory wp-content/upload/2024/10. Is its parent directory writable by the server?

[复制链接]

200

主题

33

回帖

944

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
944
发表于 2024-10-6 22:00:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
当你试图在WordPress网站编辑内容时候,也就是post的时候,想插入一个图片,无法成功插入图片,并且出现下面的提示:
"Unable to create directory wp-content/upload/2024/10. Is its parent directory writable by the server?

那么,这个出错的大概率是服务器里,wp-content目录,权限不够,需要根据不同的服务器设置,改为775或者755.
请看具体的解释。

The error you're encountering suggests that WordPress is unable to create the necessary directory to store the uploaded image, likely due to incorrect file or directory permissions.
Here are a few steps you can take to resolve this:

1. Check Directory Permissions
Make sure the wp-content/uploads directory has the correct permissions to allow WordPress to write files. The recommended permissions for the uploads folder are typically 755 or 775.
You can adjust the permissions via FTP or your hosting control panel:
  • Connect to your website via FTP or use your file manager in your hosting control panel.
  • Navigate to the wp-content folder.
  • Right-click the uploads folder (if it exists) and set the permissions to 755 (or 775 if necessary).

2. Create the Missing Folders

If the directory wp-content/uploads/2024/10 doesn't exist, try creating it manually:
  • Within the wp-content directory, look for the uploads folder.
  • Inside uploads, manually create the 2024 folder, and then create a subfolder named 10.
  • Make sure both folders have the correct permissions (755 or 775).

3. Check Ownership

The issue could also be related to file ownership. Sometimes the user running the web server (often www-data, apache, or nginx) doesn't have the necessary ownership over the directories.
To fix this, you can adjust the ownership via your hosting control panel or ask your hosting provider to set the correct ownership for the wp-content/uploads directory.

4. Update WordPress Settings
Sometimes a misconfiguration in WordPress settings can cause upload issues:
  • Go to your WordPress admin dashboard.
  • Navigate to Settings > Media and check if there’s a custom directory path set under "Store uploads in this folder." If so, make sure the path is correct.

5. Clear Cache (If Applicable)

If you're using a caching plugin or your hosting has server-side caching, try clearing the cache after making the above changes.
Once you’ve made the necessary adjustments, try uploading the image again.


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|桐木舟论坛

GMT+8, 2024-12-7 16:12 , Processed in 0.040584 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表