Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress用ローカル環境構築ツール 「Local by Flywheel」を使ってみて
Search
exc-D
February 11, 2017
Technology
0
2k
WordPress用ローカル環境構築ツール 「Local by Flywheel」を使ってみて
exc-D
February 11, 2017
Tweet
Share
More Decks by exc-D
See All by exc-D
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
110
VR and Motion Capture
excdinc
0
44
第65回 WordBench大阪「WordPressコミュニティに3年間参加して」
excdinc
0
140
WordBench Osaka #64 テーマもくもく会
excdinc
1
130
WordPress最新事情と広がる地域コミュニティ 関西オープンフォーラム2016
excdinc
1
130
WordPress Codex 日本語版を翻訳してみよう!
excdinc
0
220
How to use the 3D Printer and create the 3D Model data for printing
excdinc
1
110
フルスクラッチのテーマで サイトを作る楽しみ
excdinc
1
8.2k
WordPress in CMS Osaka Summer Festival 2016
excdinc
3
120
Other Decks in Technology
See All in Technology
AWS re:Invent 2024 re:Cap CloudFront編
yoshimi0227
0
330
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
390
データパイプラインをなんとかした話 / Improving the Data Pipeline in IVRy
mirakui
1
340
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
220
Snykで始めるセキュリティ担当者とSREと開発者が楽になる脆弱性対応 / Getting started with Snyk Vulnerability Response
yamaguchitk333
2
170
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
900
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
230
re:Invent 2024 Innovation Talks(NET201)で語られた大切なこと
shotashiratori
0
270
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
190
tokyo_re_Growth2024_yoshi
yoshi22
0
210
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
260
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
490
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Done Done
chrislema
181
16k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Automating Front-end Workflow
addyosmani
1366
200k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Building an army of robots
kneath
302
44k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
280
Rails Girls Zürich Keynote
gr2m
94
13k
Transcript
WordPress༻ϩʔΧϧڥߏஙπʔϧ ʮLocal by FlywheelʯΛͬͯΈͯ ୈ62ճ WordBenchେࡕ ദݪɹ߶(Χογʔ)
ࣗݾհ ദݪɹ߶ʢΧογʔʣ WebσβΠφʔʗϑϩϯτΤϯυΤϯδχΞʗ3DCGσβΠφʔ Digistry ද େֶɾઐֶߍͷߨࢣ WordBenchେࡕϞσϨʔλʔʗWordCamp Kansai2016࣮ߦҕһ WordPressςʔϚʮBG Photo
Frameʯ 3DΘʔ WordCamp Kansai2016࣮ߦҕһ
Έͳ͞ΜɺWordPressͰαΠτߏங͢Δͱ͖ʹ ϩʔΧϧڥ͍ͬͯ·͔͢ʁ
ͲΜͳϩʔΧϧڥߏஙπʔϧΛ͍ͬͯ·͔͢ʁ VCCW Wocker MAMP VVV XAMPP ͲΕศརͳͷ͔Γɻ
Local By Flywheel ͦ͜ʹ৽ͨͳπʔϧ͕ొɻ https://local.getflywheel.com/
Local by Flywheelͱ • DockerϕʔεͷWordPress༻ϩʔΧϧ։ൃڥπʔϧɻ • ݩʑPressmaticͱ͍͏໊લͰ20167݄ʹ$129ͰϦϦʔεɻ • ͦͷޙɺFlywheelͱ͍͏σβΠφʔαΠτ੍࡞ձ͚ࣾͷϗεςΟϯά ձࣾʹങऩʹങऩ͞Εɺݱࡏͷ໊લʹͳͬͯϑϦʔιϑτΣΞʹɻ
• ݱࡏMac൛ͷΈɻ
ਐߦதͷϓϩδΣΫτΛLocal by FlyWheelʹҠߦͯ͠ ͠Βͬͯ͘Έ·ͨ͠ɻ Local by FlywheelͷҠߦ http://www.u-arts.jp https://light-accessory.shop U-ARTS
Light
ࠓճMacͰͷखॱͷΈ͓͠·͢ɻ
Local by Flywheelͷಛ • GUIͰΒ͘Β͘ૢ࡞ɻ • ઃఆΛೖྗ͢Δ͚ͩͰɺWordPress͕Πϯετʔϧ͞Ε͙ͯ͢ʹ͑ΔΑ͏ʹɻ • ։ൃʹศརͳπʔϧ͕ͨ͘͞Μಉࠝɻ
Πϯετʔϧ VirtualBoxඞཁͰ͕͢ɺແ͚ΕࣗಈͰΠϯετʔϧͯ͘͠Ε·͢ɻ Let's GoʂϘλϯΛԡ͚ͩ͢ɻ
ϩʔΧϧڥΛҰׅཧ αʔόʔɺPHPͷόʔδϣϯΓସ͑ SSL SSH BluePrints ΤΫεϙʔτɺΠϯϙʔτ Xdebug Local by Flywheelͷػೳ
ෳͷϩʔΧϧڥΛಉ࣌ʹىಈɺγϟοτμϯ ApacheͱnginxΛΓସ͑ɻPHP5.6ɺ7.03ͳͲɺෳͷPHPόʔδϣϯΛΓସ͑ httpsͰͷঢ়ଶΛϓϨϏϡʔ rootΞΫηεՄ ηοτΞοϓͨ͠WordPressͷঢ়ଶΛςϯϓϨʔτԽɻαΠτͷΫϩʔϯΛ࡞ɻ σʔλϕʔε͝ͱσʔλΛzipΞʔΧΠϒԽɻΠϯϙʔτ͢Ε͙͢ʹ෮׆ɻ PHPStormͰͷσόοΫઃఆΛϘλϯͻͱͭͰɻ
WP-CLI adminer ngrok Mailcatcher WordPress༻ίϚϯυϥΠϯπʔϧ σʔλϕʔεཧπʔϧ Ұ࣌తʹϩʔΧϧڥΛ֎෦ʹެ։Ͱ͖Δπʔϧ ϝʔϧૹ৴ͷςετπʔϧ ಉࠝπʔϧ
αΠτͷϑΝΠϧߏ app public sql conf log WordPressຊମ σʔλϕʔεؔ࿈ϑΝΠϧ αʔόʔɺPHPͳͲͷઃఆϑΝΠϧ ϩάϑΝΠϧ
site ϧʔτϑΥϧμ
ؔ࿈ϑΝΠϧͷॴ ϗʔϜσΟϨΫτϦ/.docker/machine/machines/local-by-flywheel ԾϚγϯϑΝΠϧ ઃఆϑΝΠϧ ϗʔϜσΟϨΫτϦ/Library/Application Support/Local by Flywheel ԾϚγϯ͕ىಈ͠ͳ͘ͳΔ͜ͱ͕Կճ͕ى͜Γ·ͨ͠ɻ όοΫΞοϓ͍ͯͨؔ͠࿈ϑΝΠϧΛ্ॻ͖ίϐʔͨ͠ΒىಈͰ͖ΔΑ͏ʹɻ
※.dockerͱLibraryӅ͠ϑΥϧμʹͳ͍ͬͯ·͢ɻ Ӆ͠ϑΥϧμΛදࣔͤ͞ΔΞϓϦΛ͏͔ɺλʔϛφϧͰҎԼͷίϚϯυΛଧͭͱදࣔͰ͖·͢ɻ defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder όοΫΞοϓ͜·Ίʹ…
ଞͷϩʔΧϧڥ͔ΒͷҠߦ
• wp-contentϑΥϧμ • σʔλϕʔε(WP-CLIɺphpMyAdminͳͲͰ.sqlϑΝΠϧΛΤΫεϙʔτ) Local by FlywheelͰ࡞ͨ͠αΠτʹΠϯϙʔτ ଞͷϩʔΧϧڥ͔ΒσʔλΛΤΫεϙʔτ σʔλͷҠߦ •
wp-contentϑΥϧμ • σʔλϕʔε(WP-CLIɺadminerͳͲͰ.sqlϑΝΠϧΛΠϯϙʔτ) σʔλϕʔεͷυϝΠϯ໊Λॻ͖͑ WP-CLIͷwp search-replaceɺDATABASE SEARCH AND REPLACE SCRIPT IN PHPͳͲΛ༻ old-site.dev → new-site.dev HOSTSϑΝΠϧΛฤू(ඞཁͳ߹ͷΈ) /private/etc/hosts Ҏલͱಉ͡υϝΠϯ໊Λ༻͢Δ߹چϩʔΧϧڥͷهड़෦Λআ
ͬͱշదʹ͏ͨΊʹ
σϓϩΠπʔϧͷಋೖ ͜Ε͚ͩͷػೳ͕ἧ͍ͬͯ·͕͢ɺݱࡏͷόʔδϣϯ(1.4.2)Ͱɺ WordMoveͳͲͷσϓϩΠπʔϧಉࠝ͞Ε͍ͯ·ͤΜɻ ͜ͷ··ͩͱϦϞʔταʔόʔͱͷಉظ͕গ͠໘Ͱ͢ɻ ͦ͜Ͱ…
WordMoveΛΠϯετʔϧ ϗετϚγϯʹWordMoveΛΠϯετʔϧ͢Δ͜ͱͰ σϓϩΠ͕؆୯ʹग़དྷΔΑ͏ʹͳΓ·͢ɻ λʔϛφϧͰΠϯετʔϧ gem install wordmove
Movefileͷ࡞ WordPressຊମԼʹςΩετΤσΟοτͳͲͰ ʮMovefileʯͱ͍͏໊শͰςΩετϑΝΠϧΛ࡞
https://github.com/welaika/wordmove Movefileͷฤू local: vhost: "http://wordpress.dev" wordpress_path: "~/Local Sites/ wordpress database:
name: "local" user: "root" password: "root" ཧը໘ͰDBͷใΛࢀরɻϙʔτهड़͢Δɻ ϦϞʔταʔόʔͷใهड़͢Δɻ αϯϓϧΛݩʹlocalͷMovefileͷ֤߲Λهड़ɻ
WordMoveͷ࣮ߦ ϦϞʔτ͔ΒσʔλϕʔεɺίϯςϯπΛऔಘ wordmove pull -d -u ϩʔΧϧ͔Β͔ΒςʔϚΛΞοϓϩʔυ wordmove push -t
WordPressຊମͷσΟϨΫτϦʹҠಈ WordMoveίϚϯυ cd /Users/Ϣʔβʔ໊/Local\ Sites/αΠτͷϧʔτσΟϨΫτϦ/app/public
όονϑΝΠϧͰWordMoveͷ࣮ߦ ϑΝΠϧͷμϒϧΫϦοΫͰσϓϩΠ ςΩετΤσΟοτͳͲͰɺϑΝΠϧ໊.command ͱ͍͏ϑΝΠϧΛ࡞ อଘޙɺλʔϛφϧͰ࣮ߦݖݶΛՃ chmod u+x ϑΝΠϧ໊.command ίϚϯυΛهड़ ςʔϚͷpush
DBɺϝσΟΞͷpull ϑΝΠϧͷμϒϧΫϦοΫͰ࣮ߦ cd [αΠτύε]/app/public/ wordmove push -t cd [αΠτύε]/app/public/ wordmove pull -d -u
ͦͷଞ
΄͔ͷCMSͷΠϯετʔϧɺಈ࡞ɺཧ 1. publicϑΥϧμͷWordPressͷຊମϑΝΠϧΛআɻ 2. Πϯετʔϧ͍ͨ͠CMSͷຊମϑΝΠϧΛpublicϑΥϧμʹίϐʔɻ 3. σʔλϕʔεͷશςʔϒϧΛআɻ 4. ֤CMSͷํ๏ʹैͬͯΠϯετʔϧɻ EC-CUBE
EC-CUBEconcrete5͕ΠϯετʔϧͰ͖Δ͜ͱΛ֬ೝɻ concrete5
ࠓޙͷ։ൃ༧ఆ • Windows൛ϦϦʔε༧ఆ • σϓϩΠπʔϧ(FlywheelαʔόʔͷΈରԠ?) • ϦϞʔταΠτΛΠϯϙʔτ • ϓϨϛΞϜαϙʔτ •
Pro൛։ൃத
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ շదͳϩʔΧϧڥΛ࡞Δʹྑ͍αΠτΛ࡞Δ͜ͱͰ͢ɻ