Skip to content

How to fully uninstall qTranslate

Fully uninstall qTranslate by undoing the content mangling!

qTranslate is a WordPress plugin intended for making the creation of multilingual content as easy as working with a single language. Great in concept but it causes nothing but grief when you try to part ways with the plugin.

It works by storing all of the translations together in the title and content fields of the database, separated by special text tokens. When you remove the plugin, it’s no longer there to intercept the_content() call and parse the text so you end up with all the translations being shown at once. To be honest, I cannot recommend this plugin until the storing of translations is separated from the main content.

It’s incredibly tedious to go through all of your posts removing the translations manually, so I have written a script to automate the process of removing all the translations except for the content in one languages that you wish to retain. You may freely use the script as you see fit. All I ask is that my disclaimer remain included. Should you feel so inclined as to give me a shout about changes and additions, even better :)

*Updated with MBString calls for multibyte character support
*Code is un-maintained, and only tested against QTranslate 2.5.32

Download qCleaner here

  1. BACK UP YOUR DATABASE! WordPress has a lovely export tool.
  2. Configure the script. Open the script and set the variables at the top to point the script at the WordPress database as well as instruct it on which language you would like to retain. It’s well marked.
  3. Upload script to your server – anywhere is fine.
  4. You are about to delete all content translations but the content in the specified language.
  5. Run the script, via either Command Line or HTTP request.

23 thoughts on “How to fully uninstall qTranslate

  1. Thanks for the code, I think i will use it very soon…
    Just a question, in line 20, could i use mysql host name insted of host ip? i don’t have this info in my shared hosting account…

    Thanks in advance!

  2. Hi, thanks for this script it works great. It has one small bug though. I’m from Slovenia and our language has some characters (č,ž), that are obviously not supported in your script. After cleaning I get only ? instead of those characters. Do you have an idea how to solve this?

    • Although that is odd, as my script splits on single-byte characters. seeing ? usually means wrong character encoding (in the browser). Umm, What is your site? I will take a look.

  3. How do you run the script. Sorry if the question is stupid but little help please. Thanks in advance.

    • Hi Miho,

      You edit the file … Upload it to your server and just type the full path in a browser to the file… Viola!
      Hope that helps!?

      Have a good one


  4. Hi Jonathan,

    I used QTranslate just to have two language on one blog. My hubby writes posts in Danish and I in English.
    In the beginning – He translated my posts to Danish, but some time later he gave up and we just posted a lot of Danish posts that is not translated and some English ones that he only translated the title for… But some posts remained pure English.

    We got so tired of Qtranslate that weI want to remove it completely and just keep BOTH languages?
    Is there a possibility that you could make a version of this script to clean up and keep both?

    If would be okay to make Premium language to Danish and if a English post is translated to only keep the Danish one (makes sense in this case) but if only title is translated (no body content) then keep the secondary language (in this case English).

    As I understand or can see … all language code could then be cleaned up?

    Running on WP 3.9

    • It’s a difficult to retain all the languages because of how qTranslate works. Only one post physically exists in the database so to remove qTranslate but preserve all of the posts separately involves making new posts. This can be done however. Perhaps I will look into extending the script to migrate all of the languages to new posts.

  5. Hey Jon,
    Thanks for this amazing script.
    It still works great on the latest qTranslate and mqTranslate.

  6. I have qTranslate-X installed and can’t get rid of it

    connecting to DB…fetching posts…

    Fatal error: Call to a member function fetchAll() on a non-object in /mnt/data/accounts/s/scdweb/data/www/ on line 64

  7. Hi, I”m using Godaddy Managed WordPress server… and I’m getting this error
    error connecting to DB. sorry :(

  8. Hi,
    Would be great if i can run this (not easy to get rid off qtranslate),
    Do i have to disable the qtranslate plugin before i run the script…?

    Greetings Ton hermans

Leave a Reply

Your email address will not be published. Required fields are marked *