Debugging a Craft CMS installation on macOS

The other day, I tried to install Craft CMS 5 on my Macbook, and I had some issues with my setup.I followed the first two steps in the installation guide, and everything worked fine.
mkdir my-craft-project
cd my-craft-p…


This content originally appeared on Manuel Matuzović - Blog and was authored by Manuel Matuzović

The other day, I tried to install Craft CMS 5 on my Macbook, and I had some issues with my setup.

I followed the first two steps in the installation guide, and everything worked fine.

mkdir my-craft-project
cd my-craft-project/

ddev config --project-type=craftcms --docroot=web

After running the next command, I got an error that confused me because it seemed like nothing I could influence.

ddev composer create -y "craftcms/craft"

It looked like composer wasn't installed, but that wasn't true.

PHP Warning: require_once(/tmp/NjIfJa/vendor/autoload.php): Failed to open stream: No such file or directory in /tmp/NjIfJa/bootstrap.php on line 11

I'll spare you the details of my research. What eventually worked was updating Xcode in the App Store and the Command Line Tools inside the System Settings.

Rerunning the command, I got a new error message:

Composer detected issues in your platform: Your Composer dependencies require a PHP version >= 8.2.0. You are running 8.1.27. in…

That was also confusing because running php -v in Terminal showed me I was operating on PHP 8.3.16. Someone on StackOverflow pointed out that I, or actually the person who asked the question, may have a different PHP version running on my Apache server. phpinfo() confirmed that, but it was even lower than the version mentioned in the error message. WHAT!?

I decided to remove PHP completely and reinstall it. I followed a guide on getgrav.org.

brew update
brew upgrade
brew cleanup

brew uninstall --ignore-dependencies php
brew uninstall --force php80 php80-apcu php80-opcache php80-xdebug php80-yaml
brew uninstall --force php@8.0
brew cleanup

rm -Rf /usr/local/etc/php/*

Next I had to install PHP again.

brew tap shivammathur/php
brew install shivammathur/php/php@8.3
brew link --overwrite --force php@8.3

And that's it. After updating my operating system and doing a clean install of PHP, I could finally install Craft CMS.

My blog doesn't support comments yet, but you can reply via blog@matuzo.at.


This content originally appeared on Manuel Matuzović - Blog and was authored by Manuel Matuzović


Print Share Comment Cite Upload Translate Updates
APA

Manuel Matuzović | Sciencx (2025-01-26T00:00:00+00:00) Debugging a Craft CMS installation on macOS. Retrieved from https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/

MLA
" » Debugging a Craft CMS installation on macOS." Manuel Matuzović | Sciencx - Sunday January 26, 2025, https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/
HARVARD
Manuel Matuzović | Sciencx Sunday January 26, 2025 » Debugging a Craft CMS installation on macOS., viewed ,<https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/>
VANCOUVER
Manuel Matuzović | Sciencx - » Debugging a Craft CMS installation on macOS. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/
CHICAGO
" » Debugging a Craft CMS installation on macOS." Manuel Matuzović | Sciencx - Accessed . https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/
IEEE
" » Debugging a Craft CMS installation on macOS." Manuel Matuzović | Sciencx [Online]. Available: https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/. [Accessed: ]
rf:citation
» Debugging a Craft CMS installation on macOS | Manuel Matuzović | Sciencx | https://www.scien.cx/2025/01/26/debugging-a-craft-cms-installation-on-macos/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.