Mastering the art of WordPress: 13 years of advanced tips and tricks - my presenation of WordCamp Sofia 2024.
During my presentation, I shared the experience I had gained over the past 13 years working with WordPress. We explored advanced techniques for theme and plugin development, performance optimization, and security best practices.
We discussed how to enhance WordPress and prepare it for various projects - from simple websites to complex business platforms.
The session provided practical advice, tricks, and a look at future trends that would help improve skills and utilize the full potential of the WordPress ecosystem.
1 of 61
Download to read offline
More Related Content
Mastering the Art of WordPress: 13 Years of Advanced Tips and Tricks
1. Mastering the Art of
WordPress: 13 Years of
Advanced Tips and Tricks
Stanko Metodiev
WordCamp So鍖a, 2024
2. Stanko Metodiev
About Stanko
CTO @ DevriX
WordPress Core and community contributor
(Co) Leader of the 鍖rst WordPress meetup in
Bulgaria - WordPress So鍖a (WPBGUG)
WordCamp Organizer and Lead Organizer of
WordCamp So鍖a 2023
More than 13 years in developing complex
SaaS platforms and multisite solutions
Proud dad and a husband of princesses
3. Table of
Contents
A little bit of a backstory
Some code snippets here and there
Some WordPress tips and tricks
Some tools
Some personal thoughts and my journey so
far
And I hope you'll learn something new today
5. The personal growth
Started university as both a joke and an experiment
Stanko Metodiev
6. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Stanko Metodiev
7. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Demonstrated organizational skills
Stanko Metodiev
8. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Demonstrated organizational skills
Wasn't the best student :D (not an actual advice)
Stanko Metodiev
9. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Demonstrated organizational skills
Wasn't the best student :D (not an actual advice)
Started as an intern
Stanko Metodiev
10. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Demonstrated organizational skills
Wasn't the best student :D (not an actual advice)
Started as an intern
Worked hard and learned daily
Stanko Metodiev
11. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Demonstrated organizational skills
Wasn't the best student :D (not an actual advice)
Started as an intern
Worked hard and learned daily
Made mistakes and improved by doing them
Stanko Metodiev
12. The personal growth
Started university as both a joke and an experiment
Met some amazing people and made connections
Demonstrated organizational skills
Wasn't the best student :D (not an actual advice)
Started as an intern
Worked hard and learned daily
Made mistakes and improved by doing them
Didn't give up Stanko Metodiev
14. Open Source Community
Build and share
Write (technical)
articles and share
knowledge
Mentor others
Contribute to
WordPress and
Open-Source
Speak at
WordCamps and
conferences
Organize local
meetups
15. Technical Excellence
Master your craft
Technical expertise
Balance perfection
with pragmatism
Strategic thinking
Learning routine
Time management
Develop leadership
skills
Write maintainable,
scalable code
17. Lets get some (actual) advice,
shall we?
Stanko Metodiev
23. Performance impact - replaces the primary query, query_posts results in
two queriesone for the original and one for the overrideleading to
unnecessary database load
Risk of unexpected behavior - accidentally alter the main query in ways
that interfere with themes and plugins expecting the default query
structure, causing compatibility issues
Limited control: unlike pre_get_posts, query_posts doesnt allow
developers to refine or manipulate the existing query
Best practice: WordPress recommends using pre_get_posts or custom
WP_Query instances for safe and effective query modifications
Why NOT query_posts()?
Stanko Metodiev
26. Why pre_get_posts()?
Stanko Metodiev
Improves performance
Reduce unnecessary queries
Increased efficiency - load only relevant data, improving page speed
Tailor query results
Its just nice tool to have
There are other pre_get_<something>, check them out
29. Why and when to use get_posts()?
Stanko Metodiev
Best for simple queries
When you need just the post data
Better performance with small queries
Simple syntax
Always use wp_reset_postdata() after custom queries
32. Why and when to use WP_Query()?
Stanko Metodiev
Full control over queries
Built-in compatibility
Flexible data retrieval
Enhanced performance options
Pagination support
And many more
Always use wp_reset_postdata() after custom queries
36. Why you should be careful with -1?
Stanko Metodiev
Retrieve all posts without limitation
Avoids pagination
Useful for non-public data *
Caution: be mindful when using -1 on high-traffic,
public-facing pages with a large dataset, as it can impact
performance.
38. WP_Query optimizations
Stanko Metodiev
use posts_per_page
use post_status when applicable
use no_found_rows when you dont need pagination
use update_post_meta_cache argument if you dont need meta data
use update_post_term_cache argument when do dont need taxonomy
use fields when you need just IDs*
42. Why and when to use Object Cache?
Stanko Metodiev
Improves performance - reduces the number of expensive database
queries
Scales better with high traffic - caching frequently requested data
prevents database overload during peak traffic
Increases user experience - faster response times improve the user
experience
Flexible expiration
47. transients cache expensive data (e.g., API responses) to prevent
repetitive processing
Reduces server load
Efficient caching control and Ideal for temporary Data
Flexible storage - transients can be stored in the database or in-memory
using object caching systems like Redis or Memcached
Better user experience - faster load times improve the user experience
Why and when to use Transients?
Stanko Metodiev
52. Why and when to use REST API?
Stanko Metodiev
In our example:
Building social media cards or creating preview widgets
Creating link previews in headless WordPress setups
Getting optimized post data for mobile apps
Headless applications
Data hub applications
3rd party integrations
Many, many more
54. Security 101
Stanko Metodiev
Use strong and unique passwords. Full stop.
Use 2FA/Passkeys
Regular users audit
Limited login attempts
Solid hosting provider
Regular updates
Do not rely on security plugins *
Never ever nulled themes/plugins
58. Personalized Text Editor/IDE
Shortcuts and alias
Trusted plugins
Templates for anything
Code snippets, libraries, and templates
Bash/SSH/Terminal
WP-CLI and Query Monitor
Chrome dev tools *
Git/Version Control
Tools
Stanko Metodiev
59. AI Tools
ChatGPT / Claude / Gemini
AI changes the way we work
AI can be your friend if you
know how to use it
AI website / WordPress builders
Make sure to check some of the AI-related talks today!
Stanko Metodiev