Skip to content Skip to sidebar

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 11 replies, has 3 voices.

Last updated by Long Nguyen 1 year, 2 months ago.

Assisted by: Long Nguyen.

Author Posts
April 12, 2024 at 5:15 pm #15513671

Luka

Hello,
we're using WPML on our website and we currently have 10 languages on the website.
I've found out that when WPML is activated "Delete permanently" (deleting a media library file) takes a long time (few minutes). Media Library of our website is large (around 60k files, on 10 languages) but if WPML is not active, its almost instantly deleted.
I've checked "When deleting a post, delete translations as well" because we want to keep Media Library clean on all languages and we try to keep all languages in sync.

We're running the website on 8 cores with 16 gb of ram with nvme ssd and I've checked the Query Monitor plugin - everything feels in order. This can be reproduced on both our Production and Staging server.

Do you have any idea why this could be the issue?

April 13, 2024 at 12:45 pm #15514793

Andreas W.
WPML Supporter since 12/2018

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Do I understand right, that only deleting one media file including its translations does take various minutes or are you deleting various images in bulk?

I can currently not confirm a similar issue on the following test site:
hidden link

Please feel free to use this test site and try to recreate the issue.

Did you try already running a test by deactivating anything apart from WPML and our add-ons? Maybe a third plugin is causing the issue when running with WPML?

Did you already try to enable WP_DEBUG and check for errors when deleting the image(s)?
https://wpml.org/documentation/support/debugging-wpml/

Please try to run this test and send us the results form the debug.log.

Best regards
Andreas

April 15, 2024 at 8:26 am #15517818

Luka

In both cases (bulk delete and one file only) it takes a lot of time.
If i disable WPML its working as intended with normal speed, so its probably a combination of plugins or a sheer size of Media Library that is causing this.

Debug log: (probably not related to the problem)
[15-Apr-2024 08:06:51 UTC] PHP Deprecated: Creation of dynamic property Whip_RequirementsChecker::$configuration is deprecated in /path/to/wp/installation/wp-content/plugins/sitepress-multilingual-cms/vendor/yoast/whip/src/Whip_RequirementsChecker.php on line 37
[15-Apr-2024 08:06:51 UTC] PHP Deprecated: Creation of dynamic property Whip_RequirementsChecker::$messageManager is deprecated in /path/to/wp/installation/wp-content/plugins/sitepress-multilingual-cms/vendor/yoast/whip/src/Whip_RequirementsChecker.php on line 38
[15-Apr-2024 08:06:52 UTC] PHP Deprecated: Implicit conversion from float 105.28571428571429 to int loses precision in /path/to/wp/installation/wp-includes/pomo/plural-forms.php on line 244
[15-Apr-2024 08:06:52 UTC] PHP Deprecated: Implicit conversion from float 105.28571428571429 to int loses precision in /path/to/wp/installation/wp-includes/pomo/plural-forms.php on line 247
[15-Apr-2024 08:06:52 UTC] PHP Deprecated: Implicit conversion from float 105.28571428571429 to int loses precision in /path/to/wp/installation/wp-includes/pomo/plural-forms.php on line 248
[15-Apr-2024 08:18:30 UTC] PHP Deprecated: File Theme without header.php is deprecated since version 3.0.0 with no alternative available. Please include a header.php template in your theme. in /path/to/wp/installation/wp-includes/functions.php on line 6031
[15-Apr-2024 08:18:30 UTC] PHP Deprecated: File Theme without footer.php is deprecated since version 3.0.0 with no alternative available. Please include a footer.php template in your theme. in /path/to/wp/installation/wp-includes/functions.php on line 6031

Communication log:
go_url":"hidden link","logo_preview_url":"hidden link","project_details_url":"hidden link{project_id}/documents","add_language_pair_url":"","custom_text_url":"","select_translator_iframe_url":"","translator_contact_iframe_url":"","quote_iframe_url":"","has_translator_selection":false,"project_name_length":128,"suid":"ffad5fa853bba0b6c9eda94b382b0201","doc_url":"https://wpml.org/translation-service/lilt/","notification":false,"tms":true,"has_language_pairs":false,"deadline":true,"oauth":false,"oauth_url":"","popup_message":"","how_to_get_credentials_desc":"","how_to_get_credentials_url":"","client_create_account_page_url":"","partner":false,"review_url":"","uses_ate":false,"self_registered":false,"custom_fields":[{"label":"API Key","name":"api_key","type":"text"}],"default_service":0,"translation_feedback":false,"feedback_forward_method":"manual","rankings":{"quality":0,"quality_ranking":0.0,"speed":0,"speed_ranking":0.0,"popularity":0,"popularity_ranking":0.0,"primary":0.0,"primary_ranking":0.0},"ratings":{"wpml_average_user_rating":0.0},"specializations":[],"countries":[],"certifications":[],"redirect_to_ts?":true},{"id":117,"name":"Smartcat","description":"Smartcat is an all-in-one platform connecting businesses and translators into a continuous translation delivery loop by combining a collaborative workflow solution, a marketplace, and a network of translation professionals.\r\n","url":"https://wpml.org/go/smartcat/","logo_url":"hidden link","logo_preview_url":"hidden link","project_details_url":"%{server_url}/projects/%{project_id}","add_language_pair_url":"","custom_text_url":"","select_translator_iframe_url":"","translator_contact_iframe_url":"","quote_iframe_url":"","has_translator_selection":false,"project_name_length":128,"suid":"d1c696251639dde597dd81b6fec113a9","doc_url":"https://wpml.org/translation-service/smartcat/","notification":false,"tms":true,"has_language_pairs":false,"deadline":true,"oauth":false,"oauth_url":"","popup_message":"","how_to_get_credentials_desc":"","how_to_get_credentials_url":"","client_create_account_page_url":"","partner":false,"review_url":"","uses_ate":false,"self_registered":false,"custom_fields":[{"label":"Server URL","name":"server_url","type":"text"},{"label":"API key","name":"api_key","type":"text"},{"label":"Account ID","name":"account_id","type":"text"}],"default_service":0,"translation_feedback":false,"feedback_forward_method":"api","rankings":{"quality":0,"quality_ranking":0.0,"speed":0,"speed_ranking":0.0,"popularity":0,"popularity_ranking":0.0,"primary":0.0,"primary_ranking":0.0},"ratings":{"wpml_average_user_rating":0.0},"specializations":[],"countries":[],"certifications":[],"redirect_to_ts?":true},{"id":121,"name":"Smartling","description":"Smartling is a translation management platform and language services provider to localize content across devices and platforms. Author of Enterprise Translation Cloud, a data-driven approach to localization that helps customers achieve higher quality translation at a lower total cost.","url":"https://wpml.org/go/smartling/","logo_url":"hidden link","logo_preview_url":"hidden link","project_details_url":"hidden link{account_id}/account-jobs/{project_id}:{job_id}","add_language_pair_url":"","custom_text_url":"","select_translator_iframe_url":"","translator_contact_iframe_url":"","quote_iframe_url":"","has_translator_selection":false,"project_name_length":128,"suid":"3f1d34db7a1c34e0840e81b4aceb97db","doc_url":"https://wpml.org/translation-service/smartling/","notification":true,"tms":true,"has_language_pairs":true,"deadline":false,"oauth":false,"oauth_url":"","popup_message":"","how_to_get_credentials_desc":"","how_to_get_credentials_url":"","client_create_account_page_url":"","partner":false,"review_url":"","uses_ate":false,"self_registered":false,"custom_fields":[{"label":"User Identifier","name":"user_identifier","type":"text"},{"label":"User Secret","name":"user_secret","type":"text"},{"label":"Account UID","name":"account_uid","type":"text"},{"label":"Project ID","name":"project_id","type":"text"}],"default_service":0,"translation_feedback":false,"feedback_forward_method":"manual","rankings":{"quality":0,"quality_ranking":0.0,"speed":0,"speed_ranking":0.0,"popularity":0,"popularity_ranking":0.0,"primary":0.0,"primary_ranking":0.0},"ratings":{"wpml_average_user_rating":0.0},"specializations":[],"countries":[],"certifications":[],"redirect_to_ts?":true},{"id":144,"name":"SDL Language Cloud TMS","description":"The SDL Language Cloud TMS connector for WPML provides a seamless link between WPML and SDL Language Cloud TMS, allowing fast and easy management of multilingual web content and translation projects from within WordPress.","url":"hidden link","logo_url":"hidden link","logo_preview_url":"hidden link","project_details_url":"hidden link","add_language_pair_url":"","custom_text_url":"","select_translator_iframe_url":"","translator_contact_iframe_url":"","quote_iframe_url":"","has_translator_selection":false,"project_name_length":128,"suid":"a87dad5a887e062d5a269574bd54fc3b","doc_url":"https://wpml.org/translation-service/sdl-language-cloud/","notification":false,"tms":true,"has_language_pairs":false,"deadline":true,"oauth":false,"oauth_url":"","popup_message":"","how_to_get_credentials_desc":"Your username and password are the same as the credentials you use to login to SDL Language Cloud","how_to_get_credentials_url":"https://wpml.org/translation-service/sdl-language-cloud/#connecting-to-language-cloud","client_create_account_page_url":"hidden link","partner":false,"review_url":"","uses_ate":false,"self_registered":false,"custom_fields":[{"label":"Username","name":"username","type":"text"},{"label":"Password","name":"password","type":"text"},{"label":"Client ID","name":"client_id","type":"text"},{"label":"Client Secret","name":"client_secret","type":"text"}],"default_service":0,"translation_feedback":true,"feedback_forward_method":"manual","rankings":{"quality":0,"quality_ranking":0.0,"speed":0,"speed_ranking":0.0,"popularity":0,"popularity_ranking":0.0,"primary":0.0,"primary_ranking":0.0},"ratings":{"wpml_average_user_rating":0.0},"specializations":[],"countries":[],"certifications":[],"redirect_to_ts?":true},{"id":148,"name":"Crowdin","description":"More than 1 000 000 people use Crowdin to translate, manage and organize localization projects. No matter if you manage projects for clients, you work for a Fortune 100 company, or you're self-employed, Crowdin has features and integrations that will suit your localization needs.","url":"hidden link","logo_url":"hidden link","logo_preview_url":"hidden link","project_details_url":"","add_language_pair_url":"","custom_text_url":"","select_translator_iframe_url":"","translator_contact_iframe_url":"","quote_iframe_url":"","has_translator_selection":false,"project_name_length":128,"suid":"699e6ed91a275d04372c7289922a5610","doc_url":"","notification":true,"tms":true,"has_language_pairs":true,"deadline":false,"oauth":false,"oauth_url":"","popup_message":"","how_to_get_credentials_desc":"","how_to_get_credentials_url":"","client_create_account_page_url":"","partner":true,"review_url":"","uses_ate":false,"self_registered":false,"custom_fields":[{"label":"API token","name":"api_token","type":"text"}],"default_service":0,"translation_feedback":true,"feedback_forward_method":"manual","rankings":{"quality":0,"quality_ranking":0.0,"speed":0,"speed_ranking":0.0,"popularity":0,"popularity_ranking":0.0,"primary":0.0,"primary_ranking":0.0},"ratings":{"wpml_average_user_rating":0.0},"specializations":[],"countries":[],"certifications":[],"redirect_to_ts?":false},{"id":149,"name":"Parlam","description":"The Parlam connector for WPML will link your WordPress platform with your Parlam TMS account. Once there, you can translate the content yourself assisted by the translation memory or assign it to the freelance translator or LSP of your choice.","url":"hidden link","logo_url":"hidden link","logo_preview_url":"hidden link","project_details_url":"","add_language_pair_url":"","custom_text_url":"","select_translator_iframe_url":"","translator_contact_iframe_url":"","quote_iframe_url":"","has_translator_selection":false,"project_name_length":128,"suid":"b5a3b7ee5fa28c5370ed81e9a5db619b","doc_url":"","notification":true,"tms":true,"has_language_pairs":false,"deadline":false,"oauth":false,"oauth_url":"","popup_message":"","how_to_get_credentials_desc":"","how_to_get_credentials_url":"","client_create_account_page_url":"","partner":true,"review_url":"","uses_ate":false,"self_registered":false,"custom_fields":[{"label":"API token","name":"api_token","type":"text"}],"default_service":0,"translation_feedback":true,"feedback_forward_method":"manual","rankings":{"quality":0,"quality_ranking":0.0,"speed":0,"speed_ranking":0.0,"popularity":0,"popularity_ranking":0.0,"primary":0.0,"primary_ranking":0.0},"ratings":{"wpml_average_user_rating":0.0},"specializations":[],"countries":[],"certifications":[],"redirect_to_ts?":false}]
}

April 16, 2024 at 3:16 am #15522216

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Luka,

Thank you for contacting WPML support, I’m happy to help you with this issue.

I suggest you enable a minimal environment as below and see if it helps:
- Deactivate all non-WPML plugins.
- Switch to another WordPress theme.
❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/

If it does not help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Looking forward to your reply.
Thanks

April 17, 2024 at 6:59 am #15529599

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I tried some troubleshooting steps on your site but don't see it help. You can download the plugin Duplicator in the link below
hidden link

Please take a backup of your site and database, exclude some unnecessary folders like /wp-content/uploads/, /wp-content/cache/ ... and database of other subsites to reduce the file size then share it in your next reply.

Also, please try with PHP version 8.1 or lower 8.0, 7.4 to see if it helps.

Looking forward to your reply.
Thanks

April 19, 2024 at 3:42 am #15541644

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

After restoring your site on my localhost, I delete a single image or images in bulk and don't see that issue. The image is deleted quickly, here is the screen record hidden link

I also tried with both PHP versions 8.2.0 and 7.4, and there was no difference. So I think there could be an issue with your hosting. Please try to contact your hosting support and ask them to observe the error log in the hosting while deleting the images and share the information with me.

Looking forward to your reply.
Thanks

April 19, 2024 at 9:28 am #15542598

Luka

From what i could see you've restored only one website, not the whole Multisite so maybe that could also be why you're seeing speed improvements.

We're hosting the servers so we can make any changes - production website is on 16cores/64gb ram server (nginx). Can you suggest what should we check on our configuration?

It's probably the issue with a lot of files in a Media Library since it doesnt happen on other sites in MU where there is few hundred of images, only here where we have 60k.

When i click "Delete Permanently" there is nothing in the error log of this website, and i've also enabled php-fpm slow log to see what takes the longest time, but nothing came up. Also, the error.log from MySQL is empty.

April 20, 2024 at 10:35 am #15545899

Luka

I can confirm that immidiately when i remove the uploads folder and when there are no files on the disk the website starts to "delete permanently" in a normal speed.
So, probably if i were to transfer uploads folder to another server, it would be slow again.

April 22, 2024 at 2:40 am #15547886

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I can confirm that immediately when I remove the uploads folder and when there are no files on the disk the website starts to "delete permanently" in a normal speed.

That could be the issue because I see the uploads folder on your site has around 43GB of data and no data in the backup file so I can delete the images in the Media Library normally on the localhost.

Let me discuss this issue with our 2nd tier support, I will update you here when I have something to share.

Thanks.

April 22, 2024 at 10:22 am #15549536

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Our 2nd tier support suggests you use the Blackfire or Xdebug Profiler to observe the performance issue when deleting an image on your site.
Please follow the documentation to use them:
hidden link
hidden link

If you are not familiar with that, please contact the hosting support and ask them to implement it on your site, observe the performance and share the profiler with us.

Looking forward to your reply.
Thanks

April 22, 2024 at 10:48 am #15549698

Luka

Hello,
I was thinking about Blackfire before but since its a bit expensive, ill try and debug with different tools, like xdebug.
I'll let you know of the findings.

April 23, 2024 at 1:12 am #15553314

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

I'm waiting for your feedback.

Thanks.

The topic ‘[Closed] WPML – Media Library "Delete permanently" takes a long time’ is closed to new replies.