Please make sure to update to WPML 4.3.4 before reporting any issue

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 5 replies, has 2 voices.

Last updated by Carlos Rojas 2 months ago.

Assigned support staff: Carlos Rojas.

Author Posts
September 18, 2019 at 3:33 pm #4598183

The Smalls

Hi, after searching how i can completely delete a language and all translated content i came up with a thread, the support replied to user as such:

Please backup your site completely before proceeding

1. Using Admin bar switcher >> switch to Secondary language >> Select all & Delete the English posts.
2. Then do same steps for pages/media images/taxonomy.
3. Deactivate the Secondary language in wpml >> languages.
4. Now you can reset WPML by Going to WPML >> Support >> Troubleshooting >> There, click on “Reset and deactivate WPML” - this action will remove WPML tables (tables with the 'icl_' prefix) from the database.

When running a large site this method cannot be completed.
It's not possible to delete tens of thousands of posts / products / taxonomies etc.

Isn't there any query to run directly in the database to delete everything for a specific language?

best regards,

September 19, 2019 at 12:51 pm #4604859

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hello,
Thank you for contacting WPML support.

I consulted our specialists about this request and he answered that deleting the posts in the database is not a simple process because besides deleting the content of the posts there a lot of metadata and other information related to each post that is stored in several other tables. That's why this process is slow.

Kind regards,
Carlos

September 19, 2019 at 2:35 pm #4606397

The Smalls

Lets say we have a site with woocommerce with 10k of products and 2k blog posts.
Also there are some hundreds of product/post categories / tags / attributes.

With your procedure I have to go to the product list, change show 200 products at once and select all + delete for 50 times (also wait until 200 products to be deleted if we dont have any timeouts and do the procedure again with 100 products at a time).
This have to be repeated for blog posts, taxonomies etc.

I know that the queries involve many tables, but it's the same procedure as deleting a post from the admin screen, so you could add an option "delete all data" along with "Reset and deactivate WPML".

With wp cli, or cron or a check box in the plugin settings, it would be easier to get rid of one language data, instead of deleting bulk data by hand, or any other way your team will think to make it easier.

best regards,

September 20, 2019 at 10:09 am #4611309

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi,
Thank you for your feedback.

I understand your point and I also understand that, with that amount of posts to delete it will take some time to finish. However there is no query to achieve this, even WordPress doesn't have an 'official' query to delete all posts.

As this solution would need custom development I would recommend you to consider contacting one of our certified partners in this link: https://wpml.org/contractors/

And/or create a featured request in this link: https://wpml.org/suggest-a-new-feature-for-wpml/

Thank you very much for your patience and understanding.
Regards,
Carlos

September 20, 2019 at 10:17 am #4611327

The Smalls

I've posted a feature request.

best regards,

September 20, 2019 at 10:57 am #4611573

Carlos Rojas
Supporter

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

Timezone: America/Montevideo (GMT-03:00)

Hi there,
Thank you very much for creating this featured request.

Best regards,
Carlos