You can add them using symlinks:
npm run sync ../../path/to/your/wordpressIf you work with Local by Flywheel you have to use their addon Volumes to add the plugins to the WordPress.
Our recommendation is to use Homebrew:
brew install phpOur recommendation is to use Hombrew:
brew install composerThen, install the dependencies:
composer installOur recommendation is to use DBngin.
Once you've installed DBngin, create a new MySQL database (v5.7) and click on "Start".
Then, click on the terminal icon and add the line it shows
to your .bash_profile or .zshrc file:
# DBngin exports
export PATH=/Users/Shared/DBngin/mysql/5.7.23/bin:$PATHChange 5.7.23 for your MySQL version.
Our recommendation is to use pecl:
pecl install xdebugAfter the installation, add an extension with the Xdebug configuration at /usr/local/etc/php/7.X/conf.d/ext-xdebug.ini:
[xdebug]
zend_extension=/usr/local/Cellar/php/7.X/pecl/YYYYYYYY/xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9000
Change 7.X for your PHP version and YYYYYY for the folder where pecl installed Xdebug.
You may need to clean your previous PHP installation first, then install it again with brew. This post explains the process. You can skip the Nginx section.
You may need to remove the first line that the pecl installation added to your php.ini file at /usr/local/etc/php/7.X/php.ini.
You can use these two commands to check that your code meets the WordPress standards:
npm run phpcs
npm run phpcbfThe first time, you need to install the database and download WordPress
npm run install-wp-testsThis will run bin/install-wp-tests.sh with the following parameters:
- DB_NAME=frontity-tests
- DB_USER=root
- DB_PASS='' (blank)
- DB_HOST=localhost
- WP_VERSION=latest
- SKIP_DB_CREATE=false
You can also run it manually if you prefer.
Then, use npm run phpunit to run the tests.