Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created December 28, 2021 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommcfarlin/9497b5f658e154f6d0e6a44b0cbdbd07 to your computer and use it in GitHub Desktop.
Save tommcfarlin/9497b5f658e154f6d0e6a44b0cbdbd07 to your computer and use it in GitHub Desktop.
Quick Tip: WordPress, MariaDB, Homebrew, on an M1
# First, install PHP 7.4 (yes, it's deprecated at the time of this writing) and symlink it.
$ brew install php@7.4
$ brew link --force --overwrite php@7.4
# Update your path to include the binary and update your profile.
$ echo 'export PATH="/opt/homebrew/opt/php@7.4/bin:$PATH"' >> ~/.zshrc
$ echo 'export PATH="/opt/homebrew/opt/php@7.4/sbin:$PATH"' >> ~/.zshrc
$ source ~/.zshrc
# Verify that it works.
$ which php
# Using the WP-CLI, drop the existing database, re-create it and install WP.
$ wp db drop
$ wp db create
$ wp core install --url=acme.test --title=Test --admin_user=admin --admin_password=password --admin_email=admin@acme.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment