Problem: After upgrading from WPML 4.6.3 to 4.6.11, a significant performance regression was observed, specifically with the 'WPML Multilingual CMS' and 'WPML String Translation' plugins. This issue was evident in REST API calls, where the time to execute 7 queries increased from approximately 10 seconds to 55 seconds. Solution: We recommend implementing a workaround by modifying the logic in the plugin files to exclude REST requests. Specifically, in the file
method to check for REST requests before executing hooks. Here is the suggested change:
public function add_hooks() {
if (!strpos($_SERVER['REQUEST_URI'], 'wp-json')) {
add_action('acf/update_field_group', [$this, 'registerGroupAndFieldsAndLayouts']);
add_filter('acf/load_field_group', Fns::withoutRecursion(Fns::identity(), [$this, 'translateGroup']));
add_filter('acf/load_field', [$this, 'translateField']);
add_action('acf/delete_field_group', [$this, 'deleteFieldGroupPackage']);
}
}
Important: Please ensure to make a full site backup (files and database) before implementing this workaround.
Update!
We are soon to release a new version of ACF Multilingual, version 2.1.4. The update will overwrite the fix suggested in this ticket. (In the file: wp-content/plugins/acfml/classes/Strings/FieldHooks.php). Our developer suggests a better workaround that will work with version 2.1.4. Add the following function.
It is important to note that the above snippet will only work with ACF Multilingual version 2.1.4
It's recommended that the snippet be added as a Must-Use plugin. Alternatively, you can add the function to the functions.php file of your theme.
**** Important! Please make a full site backup (files and DB) before you proceed with those steps****
Note: wp_is_serving_rest_request introduced in WP 6.5 relies on the REST_REQUEST global. But keep in mind that standard HTTP requests could also call REST endpoints internally (to pre-load REST request results with the normal request). The client might want to disable the ACF entity translation on a wider scope.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific 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. Should you need further assistance, please do not hesitate to open a new support ticket at WPML support forum.
Problem: Вы пытаетесь удалить теги HREFLANG на определённых страницах, таких как страницы входа и аккаунта, используя пользовательский код, который не работает. Solution: В WPML, вы можете отключить теги hreflang для всех страниц и языков через WPML > Языки > Параметры SEO. Однако, удалить hreflang только для определенных страниц невозможно. В качестве альтернативного решения, вы можете пометить эти страницы как неиндексируемые с помощью плагина Yoast SEO.
Если данное решение окажется неактуальным или не подходит под ваш случай, мы настоятельно рекомендуем проверить список известных проблем, убедиться в актуальности версии исправления и подтвердить, что у вас установлены последние версии тем и плагинов. Если проблема сохраняется, пожалуйста, откройте новый тикет поддержки.
Problem: The client reported significant slowdowns on their staging site after installing WPML, with page load times increasing to 6-10 seconds. This issue was not present on a similarly configured site without WPML. The client tried various optimizations, including disabling WPML SEO and WPML String Translation modules, which improved load times.
Solution: We recommended migrating the site to our Cloudways testing environment to isolate the problem. The client used the Cloudways WordPress Migrator plugin for this purpose. After migration, we discovered that the combination of Admin Columns Pro, ACF, and ACFML plugins significantly impacted performance. We provided a temporary workaround by modifying the
translateField
method in the ACFML plugin to prevent certain processes from executing in the admin area, which improved backend performance. We also advised on general performance enhancements such as using PHP 8, enabling caching, and optimizing database indexes.
Please note that this solution might not be relevant if it's outdated or not applicable to your specific 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 the issue persists, please open a new support ticket at WPML support forum.
Problem: The client is experiencing a critical error due to a high number of autoloaded options in their WordPress site, which is affecting site performance. They need guidance on reducing these options, creating a custom XML configuration file for WPML, and whether installing an object caching plugin would help. Solution: To reduce the number of autoloaded options, ensure that the 'autoload' setting for the 'wpml-tm-custom-xml' option is set to 'off'. If it's not, you can adjust this manually. If a wpml-config.xml file already exists on your site, you can manage it under WPML -> Settings -> Custom XML Configuration (tab). If you're unsure whether the file exists, it's safer to leave it as is. For detailed instructions on creating a wpml-config.xml file, visit https://wpml.org/documentation/support/language-configuration-files/. Regarding the installation of an object caching plugin like Redis or Varnish, while it's not directly related to the autoload issue, it is generally recommended to enhance site performance. More information can be found here: https://wpml.org/faq/prevent-performance-issues-with-wpml/.
If this solution does not fully address your issue, or if it seems outdated or irrelevant to your specific 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 at WPML support forum.
Problem: The client is experiencing slow website and backend speeds, suspecting that WPML and its translated content might be causing conflicts or using excessive processing/data/storage space. Additionally, there is concern about a large error log related to WPML. Solution: We reviewed the wp-config.php file via FTP and confirmed that the debug.log was enabled but did not show any serious issues with WPML. To prevent the file from growing and potentially causing storage problems, we deactivated the debug.log. We also clarified that the link provided by the client (https://revoltbikes.nl/wp-admin/admin.php?page=sitepress-multilingual-cms%2Fmenu%2Fdebug-information.php) is not an error log but a debug information page useful for our support team. After checking the site's frontend and backend, we did not observe any significant performance issues. We recommend the client specify where the performance issue is noticeable and why WPML is suspected to be the cause for further assistance.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please visit our known issues page, verify the version of the permanent fix, and ensure 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.
Problem: The client is experiencing issues with many autoloaded options in the WordPress database related to WPML, as indicated by the WordPress Site Health Status. Solution: We recommend checking the "Autoloaded" data from the wp_options table using the following SQL query to identify the size of each autoloaded option (size will be in KB):
SELECT option_id, option_name, sum(char_length(`option_value`))/1024 as size FROM `wp_options` WHERE `autoload` = 'yes' GROUP BY option_id ORDER BY size DESC
After running this query, share the results with us for further analysis. It's important to note that WPML requires its autoloaded data for proper functionality, so we do not recommend disabling autoload for WPML-related options. For other plugins or themes, only consider removing options if they are no longer in use, and always ensure you have a recent backup before making any changes.
If this solution does not apply to your case, or if it seems outdated, please check for 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. If issues persist, we highly recommend opening a new support ticket for personalized assistance.