Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is attempting to delete a secondary language from their website but is encountering an infinite deletion process. They want to have only one language on the website and remove WPML without causing errors. Manually deleting pages, products, and other assets leads to errors on live pages. After a WPML reset, translated files, posts, and pages remain and need to be removed manually.
Solution:
1. Ensure that there are at least two languages activated on the site before attempting to delete the secondary language.
2. If the deletion process is infinite, check the debug log for any notices related to WPML that could be causing the issue. For example:

PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /****/test/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/class-wpml-ate-proxy.php on line 128

3. Perform a full site backup before attempting a WPML reset.
4. After backing up, you can proceed with the WPML reset by following the instructions in this documentation.
5. After a WPML reset, the original posts, taxonomy terms, and media files will not be deleted, only the WPML configuration and translated contents will be cleared.

If this solution does not seem relevant to your situation, please open a new support ticket here.

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.

This topic contains 9 replies, has 3 voices.

Last updated by Bigul 1 year, 4 months ago.

Assisted by: Bigul.

Author Posts
January 22, 2024 at 7:54 pm #15213363

aleksandrL-4

Hi there. I'm trying to delete the second language from the website according your guide https://wpml.org/faq/how-to-completely-remove-a-language-from-your-site/

But I'm waiting more than one hour and I still see that deletion is in process. I do not have much files or pages there.

Is it normal or something goes wrong?

Screenshot 2024-01-22 205408.png
January 23, 2024 at 3:38 am #15214009

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

For WPML to work as expected, it is required that there are 2 languages activated at all times. This means you need your site's default language and at minimum 1 more secondary language, please ensure that is the case before deleting RU.

Once that is done, try to delete RU and let us know your results.

January 25, 2024 at 10:10 am #15225357

aleksandrL-4

I've tried to turn on third language and remothe the second one (I do not need anymore). But the result is the same - infinity process without finish.

All I need is having just 1 language on this website and remove WPML from it without crashing. Could you help with that?

If I try to delete pages, products, and other assets manually, it leads to errors on live pages

Screenshot 2024-01-25 110730.png
January 25, 2024 at 3:45 pm #15227136

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. Please check the browser console and make sure it is showing any JavaScript error related to WPML or not.

Also, please share with us the WordPress debug.log(not WPML debug information) to collect more details on this. Refer to these pages for instructions

https://wpml.org/documentation/support/debugging-wpml/

https://wordpress.org/documentation/article/debugging-in-wordpress/

To enable the WordPress Debug log, open your wp-config.php file of site root and look for define('WP_DEBUG', false);. Change it to:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
 
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
 
// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

In this case, the errors will be saved to a debug.log log file inside the */wp-content/* directory. Please try to remove the language and check if you are getting any errors or warnings related to WPML in the log file.

If you can paste your debug.log to http://pastebin.com/index.php and provide me that link it would be great! (This is the cleanest way because sometimes the logs are long and create a complete mess of discussion).

--
Thanks!

Bigul

January 26, 2024 at 11:29 am #15229801

aleksandrL-4

Thank you Bigul,
Here is the link and the scrinshot of tmy console
https://pastebin.com/0g36H6s7

Screenshot 2024-01-26 122235.png
January 26, 2024 at 1:45 pm #15230430

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. The Debug log is showing the following notice related to WPML. But it will be causing this bug.

PHP Deprecated:  Using ${var} in strings is deprecated, use {$var} instead in /****/test/wp-content/plugins/sitepress-multilingual-cms/classes/API/REST/class-wpml-ate-proxy.php on line 128

Just to make sure, you want to delete the secondary language completely, after that only the default language contents will exist on the site, am I correct?

If so, please try the WPML reset after a full site backup{mandatory} and make sure you are getting the expected results or not. Once we reset it will not be possible to restore the data.

Please refer to this article for more details - https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/#step-3-do-the-wpml-reset

--
Thanks!

Bigul

January 26, 2024 at 6:15 pm #15231438

aleksandrL-4

I've made this on my Staging site, looks like it works. But now I think I shoyld delete all content associated with deleted language manually?

Is there any way to delete it automatically?

January 27, 2024 at 9:44 am #15232312

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the updates. Once we reset WPML or remove a secondary language its contents will automatically deleted from the site. We don't have to delete manually.

Please check and let us know your feedback.

--
Thanks!

Bigul

January 27, 2024 at 9:49 am #15232314

aleksandrL-4

Thank you so much for your help! The main problem was solved, anyway.

Regarding manually deletion: all translated files, posts and pages were saved after WPML reset, so I still need to remove it manually. The same warnings is in the note about WPML reset.

Screenshot 2024-01-27 104645.png
January 27, 2024 at 6:10 pm #15233189

Bigul
WPML Supporter since 01/2013

Languages: English (English )

Timezone: Europe/Vienna (GMT+02:00)

Hello,

Thank you for the feedback. That means WPML will not delete the original posts, taxonomy terms and media files when we reset. It will only clear the WPML configuration and translated contents. So we don't have to worry about.

Also, WPML will only keep the data in database and it will be cleared when we reset. Please verify.

--
Thanks!

Bigul