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
kassy
February 11, 2017
Technology
0
2k
WordPress用ローカル環境構築ツール 「Local by Flywheel」を使ってみて
kassy
February 11, 2017
Tweet
Share
More Decks by kassy
See All by kassy
VR and Motion Capture
kassy000
0
42
第65回 WordBench大阪「WordPressコミュニティに3年間参加して」
kassy000
0
140
WordBench Osaka #64 テーマもくもく会
kassy000
1
120
WordPress最新事情と広がる地域コミュニティ 関西オープンフォーラム2016
kassy000
1
120
WordPress Codex 日本語版を翻訳してみよう!
kassy000
0
210
How to use the 3D Printer and create the 3D Model data for printing
kassy000
1
110
フルスクラッチのテーマで サイトを作る楽しみ
kassy000
1
8.1k
WordPress in CMS Osaka Summer Festival 2016
kassy000
3
120
A Slide of session for accessibility ready theme in WordCamp Kansai 2016
kassy000
0
70
Other Decks in Technology
See All in Technology
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.6k
使えそうで使われないCloudHSM
maikamibayashi
0
170
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
Apple/Google/Amazonの決済システムの違いを踏まえた定期購読課金システムの構築 / abema-billing-system
cyberagentdevelopers
PRO
1
220
WINTICKETアプリで実現した高可用性と高速リリースを支えるエコシステム / winticket-eco-system
cyberagentdevelopers
PRO
1
200
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
180
Gradle: The Build System That Loves To Hate You
aurimas
2
150
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
プロポーザルのつくり方 〜個人技編〜 / How to come up with proposals
ohbarye
2
160
運用イベント対応への生成AIの活用 with Failure Analysis Assistant
suzukyz
0
140
CyberAgent 生成AI Deep Dive with Amazon Web Services / genai-aws
cyberagentdevelopers
PRO
1
480
わたしとトラックポイント / TrackPoint tips
masahirokawahara
1
240
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
The Language of Interfaces
destraynor
154
24k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Building Adaptive Systems
keathley
38
2.2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
7
160
Designing the Hi-DPI Web
ddemaree
280
34k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
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൛։ൃத
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ շదͳϩʔΧϧڥΛ࡞Δʹྑ͍αΠτΛ࡞Δ͜ͱͰ͢ɻ