SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
WordPress
Architecture and
Platform Capabilities
Mario Peshev
➔ CEO, WordPress Architect @ DevriX
➔ Former Java/PHP/Python Developer
➔ Consultant and Technical Lead for several SaaS Solutions
➔ Marketing and Project Management day-to-day activities
➔ @no_fear_inc on Twitter
About Me
@no_fear_inc , Mario Peshev
Scope of the training
1. Main principles of WordPress
2. Technical considerations and requirements
3. WordPress flow and architecture
4. WordPress Themes and Plugins
5. Stability, Performance, and Security
Introduction
@no_fear_inc , Mario Peshev
1. The most widespread CMS in the world that currently
powers over 27% of the Internet
2. Runs on the popular PHP/MySQL stack
3. Suitable for both small blogs, mid-sized applications
up to sites serving tens of millions of PV/month
4. Large ecosystem of themes, plugins, tools
What is WordPress?
@no_fear_inc , Mario Peshev
● 2001 - b2/cafelog
● 2003 - WordPress forked by Matt Mullenweg and Mike
Little
● 2004-2005 - themes and plugins
● 2007 - widgets, taxonomy system, speed
● 2010 - post types, menus, APIs, default theme
● 2016 - REST API
WordPress History
@no_fear_inc , Mario Peshev
Some use cases of WordPress
1. Standard blogs/sites
2. Online magazines and collaboration platforms
3. Large CMS applications
4. Software as a Service solutions
5. eCommerce platforms
6. Multisite networks
WordPress Applications
@no_fear_inc , Mario Peshev
As a programming environment
1. Scalable framework for high-traffic websites
2. Plenty of APIs (CPT, Taxonomies, Shortcodes, Options,
Settings, HTTP, Widgets, Rewrite, REST)
3. Hundreds of hooks for life cycle control
4. Extensibility and 3rd party integrations
WordPress Core
@no_fear_inc , Mario Peshev
The WordPress database schema
Server Requirements
1. Minimum requirements: PHP 5.2.4+ and
MySQL 5.0.15+
2. Compatible with Apache + PHP or nginx
+ php-fpm
@no_fear_inc , Mario Peshev
WordPress Core Load
Three main entry points:
● index.php (public)
● admin.php (logged in)
● admin-ajax.php (AJAX requests)
There are common components loaded
in all cases (hooks as well).
Tip
Tell the audience about
the problem through a
story, ideally a person.
@username Name Surname
WordPress Hooks
WordPress is extended through hooks
placed in the Core and within
themes/plugins.
➔ Actions
Change the standard life cycle
processing, output data, connect other
applications
➔ Filters
Update the state of an incoming value
used later on in the process
Actions
Defined with do_action() in Core
Called in plugins with add_action()
Provide the ability to inject custom
logic or update the WordPress flow
@no_fear_inc , Mario Peshev
Filters
Defined with apply_filters() in Core
Utilized through add_filter() calls
Allow for editing an expected variable
that is used later on in the flow
@no_fear_inc , Mario Peshev
The presentation layer
1. The main component providing the presentation layer
for a WordPress website
2. Best-case scenario, used exclusively for leveraging the
template hierarchy for data display
3. Premium themes often violate the simple rules
WordPress Themes
@no_fear_inc , Mario Peshev
Template Hierarchy
Default fallback is index.php
Important 2nd level templates:
● single.php
● page.php
● home.php
● archive.php
Tip
Tell the audience about
the problem through a
story, ideally a person.
@no_fear_inc , Mario Peshev
A Theme’s Structure
A trimmed sample in Underscores, a
starter theme for WordPress
● style.css - keeping the general
styling and metadata for the theme
● index.php - a mandatory template
file
● functions.php - powers all in-theme
features
Story for illustration purposes only@no_fear_inc , Mario Peshev
Extending a theme
1. Themes can work independently without a need of
extension
2. Extensibility should happen through child themes that
only override parent’s attributes
3. Look at theme frameworks as well
Parent/Child Themes
@no_fear_inc , Mario Peshev
Adding new features to WordPress
1. Features should be added exclusively through Plugins
2. Plugins leverage WordPress actions and filters in
order to change or extend the life cycle of WordPress
WordPress Plugins
@no_fear_inc , Mario Peshev
1. A theme can “technically” introduce new features
through functions.php
2. It’s a bad practice as this prevents clients from
switching themes without losing features
3. A common problem with a large percentage of
premium themes working as all-in-one
functions.php vs.
Plugins
@no_fear_inc , Mario Peshev
Sample WordPress Plugin
(demo)
The Core Pillars of
DevriX
The main Code Quality considerations for
WordPress engineers
➔ Stability
The ongoing stability across updates
and as the traffic grows
➔ Performance
Site load times and the ability to handle
high traffic
➔ Security
Secure and safe environment with data
protection in place
The main problems
1. A stable WordPress solution depends on solid code
base, reliable server infrastructure, right choice of
components
2. Bundling plugins and themes together may cause
various conflicts
3. Adding multi-purpose plugins will add up to load, too
Stability
@no_fear_inc , Mario Peshev
Across WordPress updates
1. WordPress Core gets 2-3 major updates a year
2. Plugins may get 5-50 updates annually
3. Combining general purposes solutions together could
cause various conflicts
4. This may lead to warnings and errors or data loss
Stability
@no_fear_inc , Mario Peshev
Clean code and WP Standards
1. Following the WordPress Coding Standards is
mandatory
2. Plenty of off-the-shelf plugins don’t comply with the
conventions or care about the WP load cycle
3. Regular tracking of queries, DB and data calls is
needed
Stability
@no_fear_inc , Mario Peshev
Automated tools and testers
1. Use tools such as PHP CodeSniffer, PHP MD, ES Lint,
JSHint, jsLint
2. Unit and integrational testing tools and scripts
3. Continuous Integration and pre-deployment hooks
Stability
@no_fear_inc , Mario Peshev
Staging and dev environments
1. Deployment environment should be distributed to
dev -> test (staging) -> production
2. Staging environment has to resemble production as
much as possible
3. Managed hosts often provide staging toolkits for
clone and sync
Stability
@no_fear_inc , Mario Peshev
Automated UI tests
1. Selenium could be used for recording features and
automated UI/test suites
2. BBC’s wraith can record states of a site and its pages
3. Test suites can be automated and included in a CI
deployment suite for screenshot comparison
Stability
@no_fear_inc , Mario Peshev
1. WordPress can handle hundreds of millions of views a
month
2. This does require a professional devops and web
development team following the standards and able
to scale in different scenarios
3. A small mistake can reduce the load time with
seconds
Performance
@no_fear_inc , Mario Peshev
Our performance process checklist while conducting code-reviews and speed improvements
GT Metrix combines PageSpeed and YSlow reviews for performance analysis
Front-end for WordPress
1. Minifying/combining assets
2. Using SVGs and creating image sprites
3. Image compression
4. Async/deferred scripts
5. Remove unused CSS/JavaScript
Performance
@no_fear_inc , Mario Peshev
Back-end for WordPress
1. Detach actions and filters that are not used
2. Replace heavy plugins with lightweight ones or fork
3. Identify slower callbacks or repetitive functions
4. Offload third-party services through cache or local
callbacks
5. Optimize AJAX callbacks
Performance
@no_fear_inc , Mario Peshev
Database queries and schema
1. Consider RDBMS normalization or denormalization
2. Clean out transients, revisions, and other outdated
items
3. Reduce the number of DB queries at main pages
4. Analyze slow queries and optimize accordingly
5. Use EXPLAIN for questionable queries
Performance
@no_fear_inc , Mario Peshev
Server-level enhancements
1. Fine tuning the FPM processes and nginx workers
2. Enable logging and look for possible hidden warnings
and notices or CPU/IO/RAM spikes
3. Enable memcached/redis, gzip compression and
expire headers
4. Stress test for lower TTFB results and concurrency
Performance
@no_fear_inc , Mario Peshev
WordPress Core is secure by design if the right integration
is performed
Security issues usually arise from:
● Outdated software
● 3rd party plugins or themes
● Insecure servers
● Human errors (weak passwords, open Wi-Fi)
Security
@no_fear_inc , Mario Peshev
Main WP problems
1. Generic solutions are not audited for security
2. There is no guaranteed repository for safe plugins
3. Security could be handled through isolated server
management, automated updates, regular backups
policy, code and database auditing and code reviews
before adding a feature
Security
@no_fear_inc , Mario Peshev
OWASP Top 10
The most authoritative list for top
vulnerabilities and security issues.
WordPress takes care of these in default
within the WordPress Core.
Following the established WP standards
prevents developers from causing
loopholes.
Story for illustration purposes only@no_fear_inc , Mario Peshev
Security Whitepaper
The Foundation and WordPress’ Security
team have released a whitepaper going
over the security state of WordPress in
details.Tip
Tell the audience about
the problem through a
story, ideally a person.
@no_fear_inc , Mario Peshev
Questions?
Tweets as @no_fear_inc
Mario Peshev on LinkedIn
nofearinc on WordPress.org
GitHubbing like mpeshev
Blogging at DevWP.eu
CEO @ DevriX.com

Mais conteúdo relacionado

Mais procurados

VMware vSphere technical presentation
VMware vSphere technical presentationVMware vSphere technical presentation
VMware vSphere technical presentation
aleyeldean
 

Mais procurados (20)

Web Fundamentals
Web FundamentalsWeb Fundamentals
Web Fundamentals
 
Intro to CloudStack API
Intro to CloudStack APIIntro to CloudStack API
Intro to CloudStack API
 
Apache web service
Apache web serviceApache web service
Apache web service
 
Service workers
Service workersService workers
Service workers
 
Configuration DHCP
Configuration DHCPConfiguration DHCP
Configuration DHCP
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
How to Get Started With NGINX
How to Get Started With NGINXHow to Get Started With NGINX
How to Get Started With NGINX
 
VMware vSphere technical presentation
VMware vSphere technical presentationVMware vSphere technical presentation
VMware vSphere technical presentation
 
Apache Server Tutorial
Apache Server TutorialApache Server Tutorial
Apache Server Tutorial
 
Introduction to HTTP protocol
Introduction to HTTP protocolIntroduction to HTTP protocol
Introduction to HTTP protocol
 
Virtualization security
Virtualization securityVirtualization security
Virtualization security
 
Microsoft Hyper-V
Microsoft Hyper-VMicrosoft Hyper-V
Microsoft Hyper-V
 
ここまできた! ”第6世代”ファイバーチャネルがもたらす ストレージ・ネットワークの 新たな可能性とは?
ここまできた! ”第6世代”ファイバーチャネルがもたらす ストレージ・ネットワークの 新たな可能性とは?ここまできた! ”第6世代”ファイバーチャネルがもたらす ストレージ・ネットワークの 新たな可能性とは?
ここまできた! ”第6世代”ファイバーチャネルがもたらす ストレージ・ネットワークの 新たな可能性とは?
 
CloudStack Networking
CloudStack NetworkingCloudStack Networking
CloudStack Networking
 
당근마켓에서 IaC경험
당근마켓에서 IaC경험당근마켓에서 IaC경험
당근마켓에서 IaC경험
 
What is Virtualization
What is VirtualizationWhat is Virtualization
What is Virtualization
 
Boas práticas de arquitetura e operações
Boas práticas de arquitetura e operaçõesBoas práticas de arquitetura e operações
Boas práticas de arquitetura e operações
 
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and VarnishReverse proxy & web cache with NGINX, HAProxy and Varnish
Reverse proxy & web cache with NGINX, HAProxy and Varnish
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Azure storage
Azure storageAzure storage
Azure storage
 

Semelhante a WordPress Architecture for Tech-Savvy Managers

PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
Michael Peacock
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings
10n Software, LLC
 

Semelhante a WordPress Architecture for Tech-Savvy Managers (20)

PHP North-East - Automated Deployment
PHP North-East - Automated DeploymentPHP North-East - Automated Deployment
PHP North-East - Automated Deployment
 
Automated Deployment
Automated DeploymentAutomated Deployment
Automated Deployment
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
7 must have word press plugins for web developers
7 must have word press plugins for web developers7 must have word press plugins for web developers
7 must have word press plugins for web developers
 
Test_Automation using Selenium.ppt
Test_Automation using Selenium.pptTest_Automation using Selenium.ppt
Test_Automation using Selenium.ppt
 
Reno WordPress Meetup: Gershwin
Reno WordPress Meetup: GershwinReno WordPress Meetup: Gershwin
Reno WordPress Meetup: Gershwin
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 
Security, more important than ever!
Security, more important than ever!Security, more important than ever!
Security, more important than ever!
 
Slides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetingsSlides from LAX & DEN usergroup meetings
Slides from LAX & DEN usergroup meetings
 
Wordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for ThemeforestWordpress theme submission requirement for Themeforest
Wordpress theme submission requirement for Themeforest
 
php[world] Magento101
php[world] Magento101php[world] Magento101
php[world] Magento101
 
Open Source CMS Certification
Open Source CMS CertificationOpen Source CMS Certification
Open Source CMS Certification
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
 
Optimize wordpress
Optimize wordpressOptimize wordpress
Optimize wordpress
 
Platform Security IRL: Busting Buzzwords & Building Better
Platform Security IRL:  Busting Buzzwords & Building BetterPlatform Security IRL:  Busting Buzzwords & Building Better
Platform Security IRL: Busting Buzzwords & Building Better
 
Karate _Framework.ppt
Karate _Framework.pptKarate _Framework.ppt
Karate _Framework.ppt
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 

Mais de Mario Peshev

Mais de Mario Peshev (20)

Why Does an eCommerce Store Cost 200 to 100K And More?
Why Does an eCommerce Store Cost 200 to 100K And More?Why Does an eCommerce Store Cost 200 to 100K And More?
Why Does an eCommerce Store Cost 200 to 100K And More?
 
Management Decision Making Process
Management Decision Making ProcessManagement Decision Making Process
Management Decision Making Process
 
The Future Of WordPress In 2020
The Future Of WordPress In 2020The Future Of WordPress In 2020
The Future Of WordPress In 2020
 
What Makes PHP An Awesome Language
What Makes PHP An Awesome LanguageWhat Makes PHP An Awesome Language
What Makes PHP An Awesome Language
 
Top 6 Business Tips for October 2019
Top 6 Business Tips for October 2019Top 6 Business Tips for October 2019
Top 6 Business Tips for October 2019
 
The Future of WordPress And WooCommerce
The Future of WordPress And WooCommerceThe Future of WordPress And WooCommerce
The Future of WordPress And WooCommerce
 
Tips for Successful WordPress Enterprise Projects
Tips for Successful WordPress Enterprise ProjectsTips for Successful WordPress Enterprise Projects
Tips for Successful WordPress Enterprise Projects
 
Business and Monetization Opportunities for Developers
Business and Monetization Opportunities for DevelopersBusiness and Monetization Opportunities for Developers
Business and Monetization Opportunities for Developers
 
Building SaaS with WordPress - WordCamp Netherlands 2016
Building SaaS with WordPress - WordCamp Netherlands 2016Building SaaS with WordPress - WordCamp Netherlands 2016
Building SaaS with WordPress - WordCamp Netherlands 2016
 
WordPress Code Architecture
WordPress Code ArchitectureWordPress Code Architecture
WordPress Code Architecture
 
Virtual Company - Go Limitless
Virtual Company - Go LimitlessVirtual Company - Go Limitless
Virtual Company - Go Limitless
 
Debugging WordPress
Debugging WordPressDebugging WordPress
Debugging WordPress
 
Platforms based on WordPress
Platforms based on WordPressPlatforms based on WordPress
Platforms based on WordPress
 
WordPress Theme Reviewers Team
WordPress Theme Reviewers TeamWordPress Theme Reviewers Team
WordPress Theme Reviewers Team
 
Get Involved with WordPress
Get Involved with WordPressGet Involved with WordPress
Get Involved with WordPress
 
Contributing to WordPress
Contributing to WordPressContributing to WordPress
Contributing to WordPress
 
Start Your Website for Free!
Start Your Website for Free!Start Your Website for Free!
Start Your Website for Free!
 
Choosing a WordPress Theme
Choosing a WordPress ThemeChoosing a WordPress Theme
Choosing a WordPress Theme
 
Sass in 5
Sass in 5Sass in 5
Sass in 5
 
Custom Post Types in the wild (WordCamp Sofia 2012)
Custom Post Types in the wild (WordCamp Sofia 2012)Custom Post Types in the wild (WordCamp Sofia 2012)
Custom Post Types in the wild (WordCamp Sofia 2012)
 

Último

Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
dlhescort
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
allensay1
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Sheetaleventcompany
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
amitlee9823
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
daisycvs
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
lizamodels9
 

Último (20)

Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
Call Girls Jp Nagar Just Call 👗 7737669865 👗 Top Class Call Girl Service Bang...
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 MonthsSEO Case Study: How I Increased SEO Traffic & Ranking by 50-60%  in 6 Months
SEO Case Study: How I Increased SEO Traffic & Ranking by 50-60% in 6 Months
 
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceMalegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Malegaon Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service NoidaCall Girls In Noida 959961⊹3876 Independent Escort Service Noida
Call Girls In Noida 959961⊹3876 Independent Escort Service Noida
 
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al MizharAl Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
Al Mizhar Dubai Escorts +971561403006 Escorts Service In Al Mizhar
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Nelamangala Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Whitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
Whitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRLWhitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
Whitefield CALL GIRL IN 98274*61493 ❤CALL GIRLS IN ESCORT SERVICE❤CALL GIRL
 
Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai KuwaitThe Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
The Abortion pills for sale in Qatar@Doha [+27737758557] []Deira Dubai Kuwait
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
Falcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to ProsperityFalcon's Invoice Discounting: Your Path to Prosperity
Falcon's Invoice Discounting: Your Path to Prosperity
 
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
Call Girls From Pari Chowk Greater Noida ❤️8448577510 ⊹Best Escorts Service I...
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 

WordPress Architecture for Tech-Savvy Managers

  • 2. ➔ CEO, WordPress Architect @ DevriX ➔ Former Java/PHP/Python Developer ➔ Consultant and Technical Lead for several SaaS Solutions ➔ Marketing and Project Management day-to-day activities ➔ @no_fear_inc on Twitter About Me @no_fear_inc , Mario Peshev
  • 3. Scope of the training 1. Main principles of WordPress 2. Technical considerations and requirements 3. WordPress flow and architecture 4. WordPress Themes and Plugins 5. Stability, Performance, and Security Introduction @no_fear_inc , Mario Peshev
  • 4. 1. The most widespread CMS in the world that currently powers over 27% of the Internet 2. Runs on the popular PHP/MySQL stack 3. Suitable for both small blogs, mid-sized applications up to sites serving tens of millions of PV/month 4. Large ecosystem of themes, plugins, tools What is WordPress? @no_fear_inc , Mario Peshev
  • 5. ● 2001 - b2/cafelog ● 2003 - WordPress forked by Matt Mullenweg and Mike Little ● 2004-2005 - themes and plugins ● 2007 - widgets, taxonomy system, speed ● 2010 - post types, menus, APIs, default theme ● 2016 - REST API WordPress History @no_fear_inc , Mario Peshev
  • 6. Some use cases of WordPress 1. Standard blogs/sites 2. Online magazines and collaboration platforms 3. Large CMS applications 4. Software as a Service solutions 5. eCommerce platforms 6. Multisite networks WordPress Applications @no_fear_inc , Mario Peshev
  • 7. As a programming environment 1. Scalable framework for high-traffic websites 2. Plenty of APIs (CPT, Taxonomies, Shortcodes, Options, Settings, HTTP, Widgets, Rewrite, REST) 3. Hundreds of hooks for life cycle control 4. Extensibility and 3rd party integrations WordPress Core @no_fear_inc , Mario Peshev
  • 9. Server Requirements 1. Minimum requirements: PHP 5.2.4+ and MySQL 5.0.15+ 2. Compatible with Apache + PHP or nginx + php-fpm @no_fear_inc , Mario Peshev
  • 10. WordPress Core Load Three main entry points: ● index.php (public) ● admin.php (logged in) ● admin-ajax.php (AJAX requests) There are common components loaded in all cases (hooks as well). Tip Tell the audience about the problem through a story, ideally a person. @username Name Surname
  • 11. WordPress Hooks WordPress is extended through hooks placed in the Core and within themes/plugins. ➔ Actions Change the standard life cycle processing, output data, connect other applications ➔ Filters Update the state of an incoming value used later on in the process
  • 12. Actions Defined with do_action() in Core Called in plugins with add_action() Provide the ability to inject custom logic or update the WordPress flow @no_fear_inc , Mario Peshev
  • 13. Filters Defined with apply_filters() in Core Utilized through add_filter() calls Allow for editing an expected variable that is used later on in the flow @no_fear_inc , Mario Peshev
  • 14. The presentation layer 1. The main component providing the presentation layer for a WordPress website 2. Best-case scenario, used exclusively for leveraging the template hierarchy for data display 3. Premium themes often violate the simple rules WordPress Themes @no_fear_inc , Mario Peshev
  • 15. Template Hierarchy Default fallback is index.php Important 2nd level templates: ● single.php ● page.php ● home.php ● archive.php Tip Tell the audience about the problem through a story, ideally a person. @no_fear_inc , Mario Peshev
  • 16. A Theme’s Structure A trimmed sample in Underscores, a starter theme for WordPress ● style.css - keeping the general styling and metadata for the theme ● index.php - a mandatory template file ● functions.php - powers all in-theme features Story for illustration purposes only@no_fear_inc , Mario Peshev
  • 17. Extending a theme 1. Themes can work independently without a need of extension 2. Extensibility should happen through child themes that only override parent’s attributes 3. Look at theme frameworks as well Parent/Child Themes @no_fear_inc , Mario Peshev
  • 18. Adding new features to WordPress 1. Features should be added exclusively through Plugins 2. Plugins leverage WordPress actions and filters in order to change or extend the life cycle of WordPress WordPress Plugins @no_fear_inc , Mario Peshev
  • 19. 1. A theme can “technically” introduce new features through functions.php 2. It’s a bad practice as this prevents clients from switching themes without losing features 3. A common problem with a large percentage of premium themes working as all-in-one functions.php vs. Plugins @no_fear_inc , Mario Peshev
  • 21. The Core Pillars of DevriX The main Code Quality considerations for WordPress engineers ➔ Stability The ongoing stability across updates and as the traffic grows ➔ Performance Site load times and the ability to handle high traffic ➔ Security Secure and safe environment with data protection in place
  • 22. The main problems 1. A stable WordPress solution depends on solid code base, reliable server infrastructure, right choice of components 2. Bundling plugins and themes together may cause various conflicts 3. Adding multi-purpose plugins will add up to load, too Stability @no_fear_inc , Mario Peshev
  • 23. Across WordPress updates 1. WordPress Core gets 2-3 major updates a year 2. Plugins may get 5-50 updates annually 3. Combining general purposes solutions together could cause various conflicts 4. This may lead to warnings and errors or data loss Stability @no_fear_inc , Mario Peshev
  • 24. Clean code and WP Standards 1. Following the WordPress Coding Standards is mandatory 2. Plenty of off-the-shelf plugins don’t comply with the conventions or care about the WP load cycle 3. Regular tracking of queries, DB and data calls is needed Stability @no_fear_inc , Mario Peshev
  • 25. Automated tools and testers 1. Use tools such as PHP CodeSniffer, PHP MD, ES Lint, JSHint, jsLint 2. Unit and integrational testing tools and scripts 3. Continuous Integration and pre-deployment hooks Stability @no_fear_inc , Mario Peshev
  • 26. Staging and dev environments 1. Deployment environment should be distributed to dev -> test (staging) -> production 2. Staging environment has to resemble production as much as possible 3. Managed hosts often provide staging toolkits for clone and sync Stability @no_fear_inc , Mario Peshev
  • 27. Automated UI tests 1. Selenium could be used for recording features and automated UI/test suites 2. BBC’s wraith can record states of a site and its pages 3. Test suites can be automated and included in a CI deployment suite for screenshot comparison Stability @no_fear_inc , Mario Peshev
  • 28. 1. WordPress can handle hundreds of millions of views a month 2. This does require a professional devops and web development team following the standards and able to scale in different scenarios 3. A small mistake can reduce the load time with seconds Performance @no_fear_inc , Mario Peshev
  • 29. Our performance process checklist while conducting code-reviews and speed improvements
  • 30. GT Metrix combines PageSpeed and YSlow reviews for performance analysis
  • 31. Front-end for WordPress 1. Minifying/combining assets 2. Using SVGs and creating image sprites 3. Image compression 4. Async/deferred scripts 5. Remove unused CSS/JavaScript Performance @no_fear_inc , Mario Peshev
  • 32. Back-end for WordPress 1. Detach actions and filters that are not used 2. Replace heavy plugins with lightweight ones or fork 3. Identify slower callbacks or repetitive functions 4. Offload third-party services through cache or local callbacks 5. Optimize AJAX callbacks Performance @no_fear_inc , Mario Peshev
  • 33. Database queries and schema 1. Consider RDBMS normalization or denormalization 2. Clean out transients, revisions, and other outdated items 3. Reduce the number of DB queries at main pages 4. Analyze slow queries and optimize accordingly 5. Use EXPLAIN for questionable queries Performance @no_fear_inc , Mario Peshev
  • 34. Server-level enhancements 1. Fine tuning the FPM processes and nginx workers 2. Enable logging and look for possible hidden warnings and notices or CPU/IO/RAM spikes 3. Enable memcached/redis, gzip compression and expire headers 4. Stress test for lower TTFB results and concurrency Performance @no_fear_inc , Mario Peshev
  • 35. WordPress Core is secure by design if the right integration is performed Security issues usually arise from: ● Outdated software ● 3rd party plugins or themes ● Insecure servers ● Human errors (weak passwords, open Wi-Fi) Security @no_fear_inc , Mario Peshev
  • 36. Main WP problems 1. Generic solutions are not audited for security 2. There is no guaranteed repository for safe plugins 3. Security could be handled through isolated server management, automated updates, regular backups policy, code and database auditing and code reviews before adding a feature Security @no_fear_inc , Mario Peshev
  • 37. OWASP Top 10 The most authoritative list for top vulnerabilities and security issues. WordPress takes care of these in default within the WordPress Core. Following the established WP standards prevents developers from causing loopholes. Story for illustration purposes only@no_fear_inc , Mario Peshev
  • 38. Security Whitepaper The Foundation and WordPress’ Security team have released a whitepaper going over the security state of WordPress in details.Tip Tell the audience about the problem through a story, ideally a person. @no_fear_inc , Mario Peshev
  • 39. Questions? Tweets as @no_fear_inc Mario Peshev on LinkedIn nofearinc on WordPress.org GitHubbing like mpeshev Blogging at DevWP.eu CEO @ DevriX.com