Skip to content

Instantly share code, notes, and snippets.

@regepan
Last active January 28, 2024 06:30
Show Gist options
  • Save regepan/cd21ca86972a6438ae9c04a549944944 to your computer and use it in GitHub Desktop.
Save regepan/cd21ca86972a6438ae9c04a549944944 to your computer and use it in GitHub Desktop.
"core": "./_public",とすることで、localのWordPressをまるごと全部gitに入れられる。下手に隠蔽するより柔軟性が圧倒的に高い。PHPのバージョン変更可能。wp-cli使用可能。
{
"phpVersion": "7.4",
"core": "./_public",
"port": 8888
}
{
"scripts": {
"wp-env": "wp-env",
"start": "wp-env start",
"stop": "wp-env stop",
"recreate-db": "wp-env run cli wp db drop -- --yes && wp-env run cli wp db create",
"import": "wp-env run cli wp db import _db/db.sql",
"echo-url": "siteurl=`wp-env run cli wp option get siteurl` && home=`wp-env run cli wp option get home` && echo $siteurl && echo $home",
"search-replace": "wp-env run cli wp search-replace `wp-env run cli wp option get siteurl` \"http://localhost:8888\" && wp-env run cli wp search-replace `wp-env run cli wp option get home` \"http://localhost:8888\"",
"add-user": "wp-env run cli wp user create yugo a@a.com --user_pass=yugo --role=administrator",
"test": "echo \"Error: no test specified\" && exit 1"
},
}
@regepan
Copy link
Author

regepan commented Jan 28, 2024

http://localhost:8888/wp-admin/

  • id: admin
  • pass: password

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment