2. Table of contents
mobilesport.ch - Insights
What is the idea of mobilesport.ch
Main goals of the relaunch
A few statistics
Does „strong“ hardware make your WordPress faster?
Nginx vs. Apache
Site caching, AJAX and memcached
Used plugins
The WPML struggle is real
Learnings
3. What is the idea of mobilesport.ch
mobilesport.ch - Insights
Platform for sports trainers and teachers
…And other people who are keen on sports
Search and find exercises covering their needs
Put exercises together on lists
Re-use and share exercise lists with others
And of course: Use the contents in their lessons or make
their own lessons to keep themselves fit
4. What is the idea of mobilesport.ch
mobilesport.ch - Insights
5. What is the idea of mobilesport.ch
mobilesport.ch - Insights
6. What is the idea of mobilesport.ch
mobilesport.ch - Insights
7. Main goals
mobilesport.ch - Insights
1. Faster response times
2. Easier to handle and filter sports exerices
3. Refactor / modernize code base (our goal)
8. A few statistics
mobilesport.ch - Insights
11‘950 posts
4‘222 in german, 4‘171 in french, 3‘557 in italian
191‘457 post meta data records
1‘440 terms
223‘578 term relationships
1‘258 registered users
2‘387 favorite lists
33‘377 list items
And this, combined with the WPML plugin is
essentially what made it slow.
10. Does „strong“ hardware make your WordPress faster?
mobilesport.ch - Insights
More CPU or RAM != Faster Request
More CPU/RAM == More Request/sec
More RAM == More possibilities to cache
How to make a single request faster?
Fast basic installation (i.e. nginx/php5-fpm/hhvm)
Write efficient code
Cache as much as possible
11. nginx vs. apache2 - Installation
mobilesport.ch - Insights
Live Machine Test Machine
Installation Type Physical Server VPS / Amazon EC2
CPU 2x6 2.5 GHz Cores (Xeon) 1 vCPU (Xeon E5-2670)
RAM 8x8 GB (64GB total) 3.75 GB
Harddisks Native SSD EBS Network Storage
Webserver Apache 2.2.22 Nginx 1.4.1
PHP Installation mod_php5 / apache2handler php5-fpm
PHP Version PHP 5.4.x PHP 5.5.x
MySQL Version 5.5.37 5.5.37
Memcached 1.4.14 1.4.14
13. Site caching, AJAX, memcached
mobilesport.ch - Insights
What makes the new mobilesport.ch faster?
Site caching (Serving cached sites from wp-config.php)
Using AJAX for dynamic content
Don‘t load certain modules while DOING_AJAX
Cache complex business logic (wp_cache_*)
Cache complex DB queries
Use memcached as WP_Object_Cache
14. Plugins
mobilesport.ch - Insights
Which plugins did we use?
Antispam Bee
Contact Form 7
Google XML Sitemaps
Installer (Especially for WPML)
JWPlayer 6 Plugin
TinyMCE Advanced
WPML
wpSEO
15. The WPML struggle is real
mobilesport.ch - Insights
Maybe you have seen tweets like these:
16. The WPML struggle is real
mobilesport.ch - Insights
What were the problems
Various bugs with memcached
Looks like WPML is not actually tested for persistent caching
Proper cache invalidation missing
Very slow support
Support answers quite fast, but…
Solutions are developed slowly (or not at all)
New (major) bugs with every update
We are live, but there are still unfixed bugs
Memcached is „completely disabled“ in backend
Features like bulk editing removed
17. The WPML struggle is real
mobilesport.ch - Insights
What were the problems
Various bugs with memcached
Looks like WPML is not actually tested for persistent caching
Proper cache invalidation missing
Very slow support
Support answers quite fast, but…
Solutions are developed slowly (or not at all)
New (major) bugs with every update
We are live, but there are still unfixed bugs
Memcached is „completely disabled“ in backend
Features like bulk editing removed
18. Learnings
mobilesport.ch - Insights
We‘re not going to use WPML anymore
Hint: We migrated every project to our own ML solution
Mobilesport.ch is our last project where we use WPML
When using memcached
…Make sure you have enough RAM allocated
…Make sure that all plugins work properly
If possible, use nginx/php5-fpm configurations
You might want to try hhvm instead of php5-fpm
Refactoring a whole code base needs a lot of analysis
Updating WordPress or a plugin can cause serious issues