Problem: The client's WooCommerce store experienced a slowdown after installing multiple languages using WPML. The client considered removing WPML Media and untranslated strings but was unsure if these changes would significantly improve site speed.
Solution: We advised the client not to use PHP 8.3 as it is still in beta for WordPress and could slow down the site. Instead, we recommended using PHP 8.1. We suggested monitoring the site with the Query Monitor plugin to identify slow and duplicate queries. For managing strings, we directed the client to WPML > Support > Troubleshooting to delete unused strings and provided guidance on how to delete strings from WPML -> Strings Translation, which can be read more about here.
Additionally, we found that WPML Media does not significantly impact performance unless used for translating images specifically for different languages. We also noted that the site's hosting might contribute to performance issues due to resource limitations or database call restrictions, especially with increased content from multiple languages.
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket here.
Problem: The client is experiencing very slow performance on their website. A PHP X-Ray report identified WPML as the root cause. Despite updating WPML from version 4.6.12 to 4.6.13, the issue persisted. Solution: We discovered that the slow performance was due to specific theme code in
. The problematic code is a function designed to update the focus keyword for all posts of a certain type on every page load. Here is the code:
// Function to automatically update the focus keyword for all: sights<br />function update_focus_keywords_sights()<br />{<br /> $posts = get_posts(array(<br /> 'posts_per_page' => -1,<br /> 'post_type' => 'sights' //replace post with the name of your post type<br /> ));<br /> foreach ($posts as $p) {<br /> update_post_meta($p->ID, 'rank_math_focus_keyword', strtolower(get_the_title($p->ID)));<br /> }<br />}<br />add_action('init', 'update_focus_keywords_sights');
Removing this code reduced the site's load time from approximately 17 seconds to 4.5 seconds. We recommend removing or optimizing this function to improve performance.
If this solution does not apply to your case, or if it seems outdated, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket at WPML support forum.
Problema: El cliente está intentando mejorar el rendimiento de su sitio web y, tras activar WPML, observa un error en el log que indica un problema con las consultas de la base de datos. Solución: Para identificar la causa del problema de rendimiento, recomendamos seguir estos pasos: 1. Cree una copia de seguridad completa del sitio. 2. Actualice todos los plugins y temas que estén desactualizados. 3. Borre cualquier memoria cache existente. 4. Desactive todos los plugins, incluidos los de WPML. 5. Active un tema por defecto de WordPress, como Twenty Twenty. 6. Compruebe el rendimiento del sitio y haga una captura de pantalla. 7. Active los plugins de WPML y vuelva a comprobar el rendimiento del sitio, haciendo otra captura de pantalla. 8. Si el problema de rendimiento desaparece, reactive el tema y luego los demás plugins uno por uno hasta que el problema reaparezca. Esto ayudará a identificar el plugin o tema que está causando el conflicto.
Si estos pasos no resuelven el problema o si la solución propuesta resulta irrelevante debido a que está desactualizada o no se ajusta a su caso, le recomendamos abrir un nuevo ticket de soporte. También sugerimos revisar los problemas conocidos y confirmar que tiene instaladas las últimas versiones de los temas y plugins.
Problem: You are experiencing slow site performance when WPML is enabled on your website. Solution: We recommend following these steps to identify and resolve the issue: 1. Create a full backup of your site or set up a staging site as a copy of your production site. 2. Update any outdated plugins or themes. 3. Flush any existing cache memory. 4. Deactivate all plugins, including WPML plugins. 5. Activate a default WordPress theme, such as Twenty Twenty. 6. Reactivate the WPML plugins. 7. If the performance issue is resolved in this minimal setup, reactivate your theme and then other plugins one by one to identify the problematic component. Additionally, we suggest increasing the WordPress memory limit to 512M by adding the following line to your wp-config.php file:
Add this above the line /* That's all, stop editing! Happy blogging. */
If these steps do not resolve the issue or if the solution seems outdated or irrelevant to your case, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. We highly recommend opening a new support ticket for further assistance at WPML support forum.