You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac系统XAMPP环境下WordPress图片上传失败问题求助

Hey there, let’s get that WordPress image upload issue sorted out on your Mac XAMPP setup. That error almost always comes down to file permission mismatches—here’s how to fix it step by step:

1. Adjust Permissions via Finder (Graphical Method)
  • Navigate to your XAMPP htdocs folder, then locate your WordPress installation’s wp-content/uploads directory.
  • Right-click on the uploads folder and select Get Info.
  • Scroll down to the Sharing & Permissions section.
  • Make sure the _www user (this is the user Apache runs as on Mac) and your personal Mac user account both have Read & Write access.
  • If permissions are incorrect, click the lock icon at the bottom right to unlock, adjust the permissions, then click Apply to enclosed items—this ensures subfolders like 2019/04 inherit the correct settings.
2. Fix Permissions via Terminal (More Reliable for Technical Users)

Sometimes the Finder method doesn’t apply permissions deeply enough. Use Terminal for a thorough fix:

  1. Open the Terminal app on your Mac.
  2. Navigate to your WordPress root directory with this command (replace your-wordpress-folder with your actual folder name):
    cd /Applications/XAMPP/htdocs/your-wordpress-folder
    
  3. Change the owner of the uploads directory to the Apache user:
    sudo chown -R _www:staff wp-content/uploads
    
  4. Set secure, correct permissions for the directory:
    sudo chmod -R 755 wp-content/uploads
    
    Note: When you enter your Mac password in Terminal, it won’t show any characters—just type it and press Enter.
3. Verify WordPress Media Settings

Double-check that your WordPress path configuration is correct:

  • Log into your WordPress admin dashboard.
  • Go to Settings > Media.
  • Confirm the File upload path is set to wp-content/uploads (the default setting—avoid using absolute paths here).
  • Ensure the Organize my uploads into month- and year-based folders option is checked (this matches the 2019/04 path in your error message).
Quick Troubleshooting Tip

If you manually created the 2019/04 subfolder, it might have isolated permission issues. Repeat the permission adjustment steps specifically for that subfolder, and it should work.

Important: Never set folder permissions to 777—this creates a major security risk. Stick with 755 for directories and 644 for files.

内容的提问来源于stack exchange,提问作者kashif shabbir

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.12 05:20:22