Windows本地MAMP环境下无法访问CraftCMS 3插件商店
Hey there! I’ve dealt with this exact set of issues on MAMP for Windows with Craft 3 before—let’s walk through the most common fixes:
1. Verify PHP Extensions & Version
Craft’s plugin store and dashboard feed rely on outbound HTTP requests, which often fail on MAMP Windows if critical extensions are missing or the PHP version is incompatible:
- Open MAMP’s Preferences → PHP tab, and select a PHP version compatible with Craft 3 (7.4 up to 8.1 works best; avoid 8.2+ for older Craft 3 builds).
- Locate your MAMP PHP
php.inifile (you can find the path in MAMP’s PHP tab under "php.ini"). Uncomment these lines by removing the leading;:extension=curl extension=openssl - Restart MAMP to apply changes.
2. Fix File Permissions
Windows file permissions are often the culprit for random 500 errors in Craft:
- Navigate to your Craft project root folder, right-click it → Properties → Security tab.
- Add your Windows user account (or the
IIS_IUSRSgroup if using MAMP’s Apache) and grant Full Control permissions, making sure to check "Apply to subfolders and files".
3. Validate Craft Configuration Settings
Double-check your config/general.php to ensure the plugin store and URL settings are correct:
- Add or update these lines:
return [ 'siteUrl' => 'http://localhost:81/', 'baseUrl' => '@web/', 'allowAutoUpdates' => true, 'pluginStoreEnabled' => true, 'enableTemplateCaching' => false, // Disable temporarily for troubleshooting ];
4. Troubleshoot Composer Dependencies
While Contact Form installs, Sprout Forms might have dependency conflicts. Try these steps:
- Open your project folder in a terminal and run:
composer clear-cache composer update - Then attempt installing Sprout Forms directly with:
composer require verbb/sprout-forms - Check the terminal output for specific dependency errors—you may need to adjust your
composer.jsonto match compatible versions.
5. Check Craft’s Error Logs
The 500 errors will have detailed messages in Craft’s logs, which are your best bet for pinpointing the exact issue:
- Navigate to
storage/logs/in your project. - Open
web.logorcraft.logand look for entries timestamped when you tried accessing the plugin store or dashboard. Common issues here include failed curl requests, database connection problems, or missing files.
Your Console Error Context
For reference, the 500 errors you’re seeing point to failed requests for plugin store data and dashboard feed items—this aligns with the outbound request or permission issues mentioned above:
axios.js:853 GET http://localhost:81/index.php?p=admin/actions/plugin-store/plugin-store-data 500 (Internal Server Error) axios.js:853 GET http://localhost:81/index.php?p=admin/actions/plugin-store/craft-data 500 (Internal Server Error) jquery.js:9566 POST http://localhost:81/index.php?p=admin/actions/dashboard/get-feed-items 500 (Internal Server Error)
内容的提问来源于stack exchange,提问作者Paddy Dewhurst

