Skip to content

Instantly share code, notes, and snippets.

@afragen
Last active June 10, 2023 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afragen/e1aa3ffccf1a73618ee6e756bd95d297 to your computer and use it in GitHub Desktop.
Save afragen/e1aa3ffccf1a73618ee6e756bd95d297 to your computer and use it in GitHub Desktop.
Create WP Core development environments in Local Lightning
cd ..
mv ./public/wp-config.php .
rm -rf ./public
git clone git://core.git.wordpress.org/ public
ln -sv $PWD/wp-config.php $PWD/public/wp-config.php
curl -o ./public/.gitignore https://gist.githubusercontent.com/afragen/43dfff563e942353d866c81904498cb2/raw/.gitignore
curl -o setup-phpunit.sh https://raw.githubusercontent.com/afragen/setup-phpunit/master/setup-phpunit.sh
curl -o apply-trac-patch.sh https://gist.githubusercontent.com/afragen/977d765414189d5f5fae42215fe92a27/raw/apply-trac-patch.sh
bash setup-phpunit.sh --wp-version=trunk --wp-ts-version=trunk
cd public/
cd ..
mv ./public/wp-config.php .
rm -rf ./public
git clone git://develop.git.wordpress.org/ public
ln -sv $PWD/wp-config.php $PWD/public/wp-config.php
svn co https://plugins.svn.wordpress.org/wordpress-importer/trunk/ public/tests/phpunit/data/plugins/wordpress-importer
curl -o setup-phpunit.sh https://raw.githubusercontent.com/afragen/setup-phpunit/master/setup-phpunit.sh
curl -o apply-trac-patch.sh https://gist.githubusercontent.com/afragen/977d765414189d5f5fae42215fe92a27/raw/apply-trac-patch.sh
bash setup-phpunit.sh --wp-version=trunk --wp-ts-version=trunk
cd public/
#siteurl="$(wp option get siteurl | sed -e 's#/build$##')";wp option update siteurl "$siteurl/build"
#home="$(wp option get home | sed -e 's#/build$##')";wp option update home "$home/build"
siteurl="$(wp option get siteurl | sed -e 's#/src$##')";wp option update siteurl "$siteurl/src"
home="$(wp option get home | sed -e 's#/src$##')";wp option update home "$home/src"
npm install && npm run build:dev && npm run env:start && npm run env:install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment