Performance issues are treated with priority by the WPML team. If you have detected that your site is running slow or there are some slow queries running after translating it with WPML, we suggest to kindly follow this tutorial. If the problem persists, please open a ticket in our support forum. Give us as much information as possible, so we can help you faster.
In this tutorial, we will guide you through the first steps for handling performance issues related to WPML. We start by checking some basic environment setups. We also show how to detect and report slow database queries.
Having an optimized WordPress site is crucial for avoiding bugs, security issues and, of course, running a faster site.
One of the strengths of WordPress is its versatility and the possibility to achieve complex projects with the use of plugins. Sometimes, there are too many plugins installed on a site and there could even be several plugins installed for the same purpose.
Take a moment to review your plugins panel and consider if all the plugins that you have installed at the moment have a purpose for your project.
Using WordPress and latest plugin versions is always a good practice. Updates provide you not only fixes for bugs but can also prevent possible security vulnerabilities.
This is also true for WPML. Our development team is always working to make WPML more powerful and provide new multilingual functionalities. However, they also constantly work on making WPML faster.
Previously, we wrote a blog post about making your site run faster. We recommend you to give it a look as it has a lot of nice tips and considerations to keep in mind.
In general, there are four WPML settings that you should consider for optimizing performance:
To allow you to use themes without any PHP edits, WPML includes a feature that automatically converts IDs to those in the current language. If your theme attempts to load a page in English, but the site is now displaying in French, WPML will deliver the French page instead of the English page.
This feature is controlled from the WPML -> Languages page. We recommend you to enable the Adjust IDs for multilingual functionality option.
WPML String Translation is a powerful tool that allows you to translate any string on your site. However, sometimes you can feel that activating it may slow down your site.
For improving how WPML String Translation works, go to the WPML -> Theme and plugin localization page. There, in the Localization options section, under How to translate strings in themes and plugins?, be sure to select the Translate themes and plugins using WPML’s String Translation only (don’t load .mo files) option.
We recommend using this option as the other may cause performance penalties. This happens because, besides all the work that WPML String Translation has to do in order to load translations, WordPress also has to load the .mo files and its translations. This consumes a lot of memory and increases processing time and leads to performance issues.
As suggested in the following tutorial, you should deactivate the Track where strings appear on the site feature if you are not using it.
Do this, go to the WPML -> String Translation page and scroll to the options at the bottom. Deactivate the Track where strings appear on the site option.
Go to the WPML -> String Translation page and scroll down to the Auto register strings for translation section. Click the Edit button and make sure that all text domains are selected. Excluding any text domains can lead to performance issues as WPML would need to load the .mo files.
Hosting services usually provide shared hostings as a cheap way of having your WordPress site. However, if you are creating a complex site, you should consider using a private server or update to a higher hosting package in order to have all the resources that your site may need.
Newer PHP and MySQL versions are always faster. WordPress and WPML may run on earlier versions of PHP and MySQL but they may have reached their official “End Of Life”. This may make your site slower and exposed to security vulnerabilities.
You should also consider increasing your Memory Limit and WP Memory Limit. The more memory resources a site has, the faster it can run.
WP Memory Limit is usually editable directly from your wp-config.php file, however, it will not work if your host does not allow increasing the PHP memory limit. In this case, contact your host and ask them to increase the PHP memory limit.
Keep in mind that your WP Memory Limit shouldn’t be higher than your Memory Limit as it may lead to errors or not be registered.
Finally, sometimes it is also beneficial if the following values are increased.
Caching is a great way of improving your site’s loading speed. In a few words, caching “saves” some of the resources that your site uses, so, the next time a visitor uses your site, it does not need to download all the previous information again.
There are different ways to handle cache like installing a WordPress plugin or doing a server-side cache implementation.
If you take the first approach, there are several free and paid extensions for WordPress like WP Rocket, Super Cache and a lot of other WPML compatible plugins. One of the advantages of this approach is that can be easily configured and they were created specifically for WordPress sites.
However, you can go for a server-side cache implementation. Even though it is a powerful tool, depending on your server and your configuration, it can lead to over-caching and end up displaying content in the wrong language.
If you were unable to resolve your performance issues by now, you can try debugging performance problems. Please note that the steps outlined in that tutorial require advanced development skills.
If you detected slow queries or a lot of database calls while following this tutorial, it is time to open a ticket in our support forum.
WPML supporters follow this same tutorial when debugging performance issues. At the moment of opening your ticket, please specify all the steps that you have followed. This way, you avoid being asked to perform these steps again.
On the following page we show you our internal process for handling performance issue.