Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

WordPress mit Composer und Git verwalten

1.261 Aufrufe

Veröffentlicht am

Vortrag beim WordCamp Nürnberg am 16.04.2016

Veröffentlicht in: Internet
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download Full doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download PDF EBOOK here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download EPUB Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... Download doc Ebook here { http://shorturl.at/mzUV6 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

WordPress mit Composer und Git verwalten

  1. 1. Walter Ebert @wltrd walterebert.de slideshare.net/walterebert
  2. 2. Composer installieren php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer https://getcomposer.org/doc/00-intro.md
  3. 3. Composer aktualisieren // stable composer self-update // alpha/beta/... composer self-update --preview // dev builds composer self-update --snapshot https://seld.be/notes/composer-goes-gold
  4. 4. Pakete installieren $ composer require wp-cli/wp-cli $ composer require wp-cli/wp-cli:dev-master ./composer.json has been created Loading composer repositories with package information Updating dependencies (including require-dev) ... https://getcomposer.org/doc/03-cli.md#require
  5. 5. Inhaltsverzeichnis $ ls -lh -rw-r--r-- 1 walter walter 65 composer.json -rw-r--r-- 1 walter walter 45K composer.lock drwxr-xr-x 13 walter walter 4,0K vendor
  6. 6. composer.json { "require": { "wp-cli/wp-cli": "dev-master" } }
  7. 7. composer.json composer install https://getcomposer.org/doc/03-cli.md#install
  8. 8. composer.json composer install 1. composer.lock 2. composer.json https://getcomposer.org/doc/03-cli.md#install
  9. 9. composer install --no-dev { ... "require": { "wp-cli/wp-cli": "*", ... }, "require-dev": { "phpunit/phpunit": "*", "squizlabs/php_codesniffer": "*", "wp-coding-standards/wpcs": "*" }, ... }
  10. 10. composer install --no-dev -o { ... "require": { "wp-cli/wp-cli": "*", ... }, "require-dev": { "phpunit/phpunit": "*", "squizlabs/php_codesniffer": "*", "wp-coding-standards/wpcs": "*" }, ... }
  11. 11. composer.json composer update composer update --dry-run composer update wp-cli/wp-cli https://getcomposer.org/doc/03-cli.md#update
  12. 12. WP-CLI $ vendor/bin/wp --version WP-CLI 0.24.0-alpha
  13. 13. Composer-Skripte { ... "scripts": { "post-update-cmd": [ "vendor/bin/wp core update-db", "vendor/bin/wp core language update" ] }, ... } https://getcomposer.org/doc/articles/scripts.md
  14. 14. Versionen festlegen "wp-cli/wp-cli": "*" "wp-cli/wp-cli": "0.22.0" "wp-cli/wp-cli": "^0.22.0" "wp-cli/wp-cli": "~0.22.0" "wp-cli/wp-cli": "<1.0" "wp-cli/wp-cli": "dev-master" https://getcomposer.org/doc/articles/versions.md >= 0.22.0 < 1.0.0 >= 0.22.0 < 0.23.0
  15. 15. Versionen festlegen "wp-cli/wp-cli": "*" "wp-cli/wp-cli": "0.22.0" "wp-cli/wp-cli": "^0.22.0" "wp-cli/wp-cli": "~0.22.0" "wp-cli/wp-cli": "<1.0" "wp-cli/wp-cli": "dev-master" https://getcomposer.org/doc/articles/versions.md >= 0.22.0 < 1.0.0 >= 0.22.0 < 0.23.0
  16. 16. Semantische Versionierung 1. MAJOR wird erhöht, wenn API-inkompatible Änderungen veröffentlicht werden, 2. MINOR wird erhöht, wenn neue Funktionalitäten, welche kompatibel zur bisherigen API sind, veröffentlicht werden, und 3. PATCH wird erhöht, wenn die Änderungen ausschließlich API-kompatible Bugfixes umfassen. http://semver.org/lang/de/
  17. 17. Nicht nur Pakete "php": "^5.3.2 || ^7.0" "ext-gd": "*" https://getcomposer.org/doc/articles/versions.md
  18. 18. Entwicklerversionen nutzen { "minimum-stability": "dev", "prefer-stable": true, ... }
  19. 19. WordPress installieren { "require": { "php": "^5.3.2 || ^7.0", "ext-gd": "*", "composer/installers": "~1.0", "johnpbloch/wordpress": "*" }, "extra": { "wordpress-install-dir": "web/wp" } }
  20. 20. WordPress Packagist { "repositories" : [ {"type": "composer", "url": "https://wpackagist.org"} ], "require": { ... "wpackagist-plugin/wordpress-importer": "*", "wpackagist-theme/twentyfifteen": "*" } "extra": { "wordpress-install-dir": "web/wp", "installer-paths": { "web/wp-content/mu-plugins/{$name}" : ["type:wordpress-muplugin"], "web/wp-content/plugins/{$name}": ["type:wordpress-plugin"], "web/wp-content/themes/{$name}": ["type:wordpress-theme"] } } } http://wpackagist.org/
  21. 21. web/wp-config.php require __DIR__ . '/../vendor/autoload.php'; ... define( 'WP_HOME', 'http://example.com' ); define( 'WP_SITEURL', 'http://example.com/wp' ); define( 'WP_CONTENT_URL', 'http://example.com/wp-content' ); define( 'WP_CONTENT_DIR', __DIR__ . '/wp-content/' ); ... define( 'DISALLOW_FILE_MODS', true ); https://codex.wordpress.org/Editing_wp-config.php
  22. 22. web/index.php <?php define( 'WP_USE_THEMES', true ); require __DIR__ . '/wp/wp-blog-header.php';
  23. 23. Verzeichnisstruktur vendor/ web/wp/ web/wp-content/ web/index.php web/wp-config.php web/.htaccess
  24. 24. Strikte Dateirechte $ ls -l web/wp-content -rw-r--r-- 1 walter walter index.php drwxr-xr-x 2 walter walter mu-plugins drwxr-xr-x 3 walter walter plugins drwxr-xr-x 5 walter walter themes drwxr-xr-x 2 www-data www-data uploads https://bjornjohansen.no/strict-file-ownership-for-wordpress
  25. 25. Eigenes Paket nutzen { "repositories": [ { "type":"vcs", "url":"https://gitlab/user/plugin" } ], "require": { ... "vendor/package": "*" }, ... }
  26. 26. Kommerzielle Pakete ... "config": {"secure-http": false}, "repositories" : [ { "type": "package", "package": { "name": "advanced-custom-fields/advanced-custom-fields-pro", "version": "dev-master", "type": "wordpress-plugin", "dist": { "type": "zip", "url": "http://connect.advancedcustomfields.com/index.php? p=pro&a=download&k=<license key>" } } } ... https://gist.github.com/walterebert/6c591d59f04a5812cad1
  27. 27. Composer Proxy { "repositories":[ { "type": "composer", "url": "https://toranproxy/repo/packagist" }, { "packagist": false } ], ... }
  28. 28. https://github.com/hirak/prestissimo Parallele Downloads composer global require hirak/prestissimo { ... "config": { "prestissimo": { "maxConnections": 6, "minConnections": 3, ... } } ... }
  29. 29. .gitignore vendor/ web/wp/ web/wp-content/
  30. 30. ignore ignorieren vendor/ web/wp/ web/wp-content/* !web/wp-content/mu-plugins/
  31. 31. Git-Repo-Strategien • dev-master • Tags • Branches • Remote Branches, z.B.: • site, theme, plugin 1, plugin 2, … • dev, stage, prod • Feature-Klone
  32. 32. Tags git tag 1.2.1 git tag -a 1.2.1 -m "Version 1.2.1" git push origin 1.2.1 git push origin --tags
  33. 33. .gitattributes * text=auto /.gitattributes export-ignore /.gitignore export-ignore /composer.json export-ignore
  34. 34. http://12factor.net/
  35. 35. WordPress-Projekte starten roots/bedrock https://roots.io/bedrock/https://roots.io/bedrock/ org_heigl/wordpress_bootstrap https://github.com/heiglandreas/wp_bootstrap HoloTree https://github.com/HoloTree/ht-build wordpress-12factor https://github.com/dzuelke/wordpress-12factor wee/wordpress-project https://gitlab.com/walterebert/wordpress-project
  36. 36. WordPress-Projekte starten composer create-project roots/bedrock pfad composer create-project --repository-url=https://meinrepo/ meins/wordpress-project pfad
  37. 37. composer.json { "name": "meins/wordpress-project", "description": "WordPress Starter Project", "type": "project", "repositories": [ { "type": "composer", "url": "https://wpackagist.org" }, ], ... }
  38. 38. walter.ebert.engineering @wltrd walterebert.de slideshare.net/walterebert

×