How to make WPML run faster! (instead of slow)
Is WPML slowing your site to a crawl? (10-20s load times?)
I hear complaints about WPML slowing down sites almost every other day. And for the most part, there’s truth to that. ANY multi-lingual plugin, not just WPML will slow down your site.
But many people are claiming that WPML is the worst multi-lingual plugin ever and that’s isn’t true. They WERE actually pretty slow when I first tried using it in 2013 but each update got faster and faster and in around 2014 and 2015, their development team really listened to the complaints and the 3.X versions sped up incredibly. Aside from that, I also learned that the plugin CAN indeed run pretty fast. YOU JUST HAVE TO FOLLOW SOME INSTRUCTIONS. My 6-language site with tons of articles and images loads in 1 second.
Before you give up on WPML, give these things a try.
1. Disable auto-register strings for themes/plugins
It’s on the string translation page. DISABLE IT! Otherwise, every extra plugin/theme you add will add a thousand strings. Don’t worry, you can register them manually later!
2. Delete unnecessary strings
If you haven’t already figured out, string translation is the #1 reason for slow WPML sites. If your WPML is slow, there’s a good chance you have thousands of strings. I’ve seen sites with as many as 25,000 strings when they only needed 100!!! Go through them and delete them! You can even filter the strings by plugin/theme, etc.
The only strings you need are the ones showing text on the front-end THAT you intend to translate. Everything else, JUST DELETE! All the admin screen text, delete that (unless you intend to have multi-lingual admins). All the internal php string text names that only show in the code, delete that. Delete delete delete.
Your WPML site may start to run pretty fast once you get down to 500 strings. Don’t BE LAZY. Keep deleting. Scrutinize every string until you get under 100. By then, you may be shocked to find your site runs just as fast as when it was brand new.
Last tip: MAKE SURE YOU followed step #1…or else all the strings you deleted will come right back.
3. Have a clean-coded theme
WPML kinda re-processes your theme. So if your theme is bloated and inefficiently-coded, WPML will work extra hard to convert that to multi-lingual. I didn’t realize how much of a difference it can make but having your theme re-coded from scratch can make a huge difference on WPML impact. I’m not a coder so I can’t explain exactly which things.
But I’m aware that cleaning up your theme will make it run that much faster, can be anywhere from a half-second to 2 second decrease in load time. My theme was already fast but my programmer cleaned it up, I was surprised that it made WPML even faster (or more accurately, decreased its impact even further).
4. Basic speed optimization still applies
PHP 7, object caching, page caching, GZIP, having your site on a VPS instead of shared hosting. All these things make a huge difference together as well as individually.
5. Set up 2 sites
If you want to speed up WPML even further, you can do THIS trick…set up your main language site (non-WPML) on your main domain. And then put your WPML site on a sub-domain. I called mine “world.domain.com”. From there, you clone over your main language and then translate it to the other languages and output them to their own TLD. This way I have a main language site (non-WPML) that runs at full speed and then another site (WPML) for all the other languages.
This tactic is really only worth it if you have more than one translated language. Otherwise, it’s like you’re doing multi-site if you only have 2 languages.
What about WPML’s overhead?
Yes, it’s true…WPML does do a lot of php-intensive and database-intensive operations. But even without a cache plugin, I’ve been able to get a busy 1mb site to load in 1 second. (I’m on a 4-core VPS, btw.) If your theme is coded cleanly enough, you will be fine. In fact, if you’re like me…you’ll be surprised at how fast WPML can run! At this point, it’s only 200-300ms cost AT MOST compared to the exact same site without WPML.