Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Haralambos Theodorou - Using WordPress Multisite in a digital agency

Haralambos Theodorou - Using WordPress Multisite in a digital agency

More Decks by WordPress Greek Community

Other Decks in Programming

Transcript

  1. WordPress Athens 15th Meetup - July 4, 2018 What we

    do Nelios is digital agency with a global presence. Our mission is to help hoteliers increase their profits by attracting more direct bookings.
  2. WordPress Athens 15th Meetup - July 4, 2018 Nelios Quick

    Facts >240 HOSPITALITY clients the last 5 years >20% Clients GROWTH every year >96% Contracts RENEWAL rate >15 AWARDS about our services over the last couple of years >20 Digital Hospitality EVENTS in Greece where Nelios is a contributor (per year)
  3. WordPress Athens 15th Meetup - July 4, 2018 Our development

    stack Custom CMS based on PHP MVC framework (Yii2) Multi-tenant application architecture ArangoDB database engine RESTful API for connecting to our database
  4. WordPress Athens 15th Meetup - July 4, 2018 Our development

    stack • Front-end frameworks & libs • Rundeck, Gitlab & Jenkins for automation, source control and deployments • Dependencies and PHP lib versions led to very specific servers setups
  5. WordPress Athens 15th Meetup - July 4, 2018 Steep learning

    curve for new team members Almost no community and resources for our DB engine Performance Scalability Full-stack developers are hard to find Curlpits and challenges
  6. WordPress Athens 15th Meetup - July 4, 2018 2 3

    4 1 Choosing WordPress Simple technology Unlike OO PHP and MVC frameworks which are a bit hard to dive into, WordPress logic and structure are quite simple taking out all the complexity of installing, configuring, troubleshooting, debugging Expand abroad Clients don't like the fact that they’ll be tied with an agency in the long term so they seek solutions that will give them more freedom and flexibility Easier to find developers When it comes to sourcing new team members, it’s quite clear what skills are required for the ideal candidates. Unlike custom apps custom coded CMSs, working with an open-source CMS like WordPress grants that all team members have a mutual understanding of the various aspects and functionality Community & Support WordPress also comes with unprecedented support. This is in part to the extensive WordPress community where you can troubleshoot any question or concern through the WordPress Forums.
  7. WordPress Athens 15th Meetup - July 4, 2018 Decision factors

    • Common requirements across all clients • Need for rapid development and production (~70 sites/year) • Ability for remote collaboration • Extendable • Open to other platforms, APIs • Easy to deploy
  8. WordPress Athens 15th Meetup - July 4, 2018 Goals •

    Reduce development time by 25-35% • Scale-up our production capacity • Create parallel processes within the project timeline to reduce total delivery time • Minimize updates effort
  9. WordPress Athens 15th Meetup - July 4, 2018 The verdict:

    WordPress Multisite • One install, many sites • Single installation • Multiple access levels • Share themes and plugins • Shared code and user base • Single update for all sites
  10. WordPress Athens 15th Meetup - July 4, 2018 • Multiple

    developers working with same code, same database • Keep everything in Git (incl. WordPress and plugins) • Multi-environment setup • Work on dev, push to staging, deploy to production servers Designing our workflow
  11. WordPress Athens 15th Meetup - July 4, 2018 sunrise.php loads

    very early in WordPress, when most of its functions are not yet available. Further, sunrise.php loads before mu-plugins, any active plugins, and the active theme. As such, what can be done in sunrise.php is limited, and largely confined to using pure PHP to set constants that override WordPress Core behaviour. define('SUNRISE', 'on');
  12. WordPress Athens 15th Meetup - July 4, 2018 Syncing production

    db and uploads to the local dev environment can often be a very time consuming task # Use remote uploads when they don't exist locally <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} ^local\.domain\.com$ RewriteRule ^.*/(uploads/.*)$ http://domain.com/wp-content/$1 [L,R=301,NC] </IfModule> Rewrite local to remote uploads
  13. WordPress Athens 15th Meetup - July 4, 2018 Bootstrap 4.0

    npm, Gulp, Sass Advanced Custom Fields WPML Yoast SEO WP Super Cache Framework and Plugins
  14. WordPress Athens 15th Meetup - July 4, 2018 The Gulp

    task runner Gulp is a toolkit for automating time-consuming tasks in your development workflow. With Gulp you can: • Compile SASS to CSS • Minify assets • Concatenate assets
  15. WordPress Athens 15th Meetup - July 4, 2018 WordPress allows

    post authors to assign custom fields to a post. This arbitrary extra information is known as meta-data and can include bits of information such as: Beds: 2 Capacity: 4 people Air Conditioning: Yes TVs: 3 Custom fields & meta-data
  16. WordPress Athens 15th Meetup - July 4, 2018 Custom Post

    Types is a WordPress feature providing us a wide range of options. Advanced Custom Fields (ACF) provides the functionality that the WordPress core lacks, and has become an indispensable part of our workflow. ACF Pro
  17. WordPress Athens 15th Meetup - July 4, 2018 • Checkboxes

    / dropdowns select • Galleries • File Attachments • Color / Date / Time Pickers • Tabs • Repeaters ACF Pro Some of its powerful custom post types are:
  18. WordPress Athens 15th Meetup - July 4, 2018 Local JSON

    is a new feature added in ACF5 which saves field group and field settings as .json files within your theme. This allows multiple devs to work on a project, use git to push / pull files, and keep all databases synchronized with the latest field group settings. ACF Pro - JSON feature
  19. WordPress Athens 15th Meetup - July 4, 2018 WPML allows

    running multilingual websites with WordPress and to translate pages, posts, tags, categories and themes Features: Multiple languages in one WP installation String translation Media translation WPML
  20. WordPress Athens 15th Meetup - July 4, 2018 • All

    options, fields, settings lie inside the parent theme • Child themes pull styles, functions and templates from their parent • Differentiate each site by using a child theme • Different customizations can be made to each of the child themes Parent theme and child themes
  21. WordPress Athens 15th Meetup - July 4, 2018 • Create

    new sites in the network like a breeze • Copy common users, settings • Pre-configured theme options • Automatically import demo data for development • Copy and/or sync main ACF & WPML settings Automations
  22. WordPress Athens 15th Meetup - July 4, 2018 Deliver 100+

    websites/year DevOps / Scalability Remote collaborations / Outsourcing Create Software as a Service (SaaS) solutions Develop commercial WP Plugins Expand to foreign markets Roadmap
  23. Confidential and Proprietary. © Copyright 2018 by Nelios. All Rights

    Reserved. Are you a WordPress developer? See our open positions at www.nelios.com and apply if you found our story and plans interesting.