Is it possible to remove Divi shortcodes easily if you change your WordPress theme? This is a question that's been floating around on social networks. I often see these topics of conversation where some people say that it's impossible to change your theme after using Divi... Or that you can't go back once you've used Divi!
Really? Since when is your WordPress site married to your Divi theme? Just know that you can remove Divi easily and without pulling your hair out 😉
In this article, I present to you a plugin that will be very useful if you decide to switch from Divi to another WordPress theme. You'll see that it will only take you 10 seconds to clean up the mess Divi left behind.
Announcement: this article contains affiliate links that you will easily recognize. The classic links are in purple and the sponsored links are in pink.
What happens if I disable the Divi theme and enable another theme?
WordPress is great for this: you can change your theme in one click. Just go to the Appearance > Theme and activate the theme of your choice.
However, there is a "BUT"... When you change your theme, the old one may leave traces. This is particularly true of themes that use page builders such as Visual Composer, to name but one.
So you know that if you activate a new theme that doesn't use the same page builder as the old one, you can get surprises. This is the case with Divi, which uses the Divi Builder (the Divi page builder) natively.
If you need to understand the differences between Divi and the Divi Builder, I invite you to read this article.
In concrete terms, here is a picture of what will happen if you activate another theme after using Divi :
Version of a page built with the Divi Builder :
Version of a page built with the Divi Builder, after activation of another theme:
Okay, that's not reassuring and it may worry you...
However, you should know that I have never had to redesign a Divi theme to switch to another theme. Most of my clients ask me to do the opposite, i.e. to from their current theme to Divi.
And most (if not all) Divi users don't consider changing themes after using Divi...
So you don't have to worry about it. But if one day you decide to change your theme, or if one of your customers asks you to, you can easily get rid of Divi!
Version of my page cleaned of Divi shortcodes:
Does this reassure you?
It only took a few seconds to go from a page displaying all the Divi shortcodes to a clean page . I should mention that my content was not lost in the process.
I'll tell you how...
How do I clean my site and remove Divi shortcodes?
The Divi Builder builds your pages using shortcodes. These are invisible when the Divi theme is active but become visible when you activate another theme.
Want to see it in action? Find out how the Divi Builder works
If your site consists of several dozen pages built with the Divi BuilderIt would be counterproductive to delete Divi shortcodes by hand. It would be tedious and it could drive you totally crazy!
Good news, there is a freemium plugin that will remove shortcodes from Divi . Moreover, you won't have to set anything: it's Shortcode Cleaner Lite.
Simply go to the Extensions > Add tab and type its name in the search bar to find and install it.
Once activated, this plugin will detect all "broken" shortcodes, i.e. all unused shortcodes.
So this plugin is miraculous if you want to remove the Divi theme. But it will also clean up any unused shortcodes generated by other plugins.
I'm thinking in particular of the time when I had added a "click to tweet" shortcode to each post on one of my blogs. The day I decided to delete this plugin, I had a lot of fun cleaning up all my articles... Shortcode Cleaner Lite would have saved me a lot of time!
Furthermore, once the plugin has cleaned up your pages, you can go to its dashboard and check the work it has done:
- in the dashbord you will find most of the essential information such as :
- the number of "broken" shortcodes
- cleaning dates
- deleted shortcode types
I suggest you see Shortcode Cleaner in action in the following video:
Can we go back and reactivate the Divi theme?
It is likely that after activating another theme, you will miss your good old Divi theme 😂😂😂
In this case, it is possible to reverse the process. Shortcode Cleaner removes broken shortcodes. This means that if you reactivate Divi, the shortcodes will no longer be "unused" and your layout will return to its original construction (if you have not made any changes to your content in the meantime).
Not even afraid to switch to the Divi theme! Find out what you can do with it...
In conclusion...
I really wanted to write this article for several reasons:
- because Shortcode Cleaner can be very useful for removing all types of shortcodes that are no longer in use, not just those in the Divi Builder,
- because I wanted to answer the people who say that Divi is "dirty" and that it leaves traces...
- because I wanted to prove that it is possible to switch from Divi to another theme without getting tired.
Feel free to leave a comment if you've ever had to clean up lots of shortcodes, maybe you have other solutions?
Merci de ce post !
J’ai eu le cas récemment d’un prospect qui a refusé ma proposition de travailler avec moi si j’utilisai DIVI, de peur de se retrouver avec une « purée de short codes » en cas de casse ou de changement de thème.
Si j’avais su ! Je ne connaissait pas ce plugin.
Me voilà armé pour la prochaine fois 😉
Oui Michel ! C’est sûr que c’est rassurant… et c’est un bon argument 😉
Merci Lycia, super article. Est-ce que ce plugin peut servir aussi pour nettoyer son thème Divi si on a ajouté des choses/plugins qu’on utilise plus par exemple ? Histoire dit-on d’avoir un code « plus propre » ?
Hello Murielle ! Comment ça va ??? Écoute, ce plugin marche pour tous types de plugins qui utilisent des shortcodes et qui sont désactivés. Que ce soit le Divi Builder ou un autre plugin ça marche. Si tu réactives le plugin, tout remarche… Ce plugin « cache » les shortcodes « cassés »
Merci infiniment pour l’info. J’ai fait des recherches et il y a maintenant une version PRO qui permet de supprimer définitivement les Shortcodes de la base de données. https://codecanyon.net/item/shortcode-cleaner-clean-wordpress-content-from-broken-shortcodes/21253243 Ce qui est préférable si l’on ne prévoit pas de retourner à Divi. Les Shortcodes de Divi prennent beaucoup de place dans la Base de données et augmente son poids significativement.
Il existe une autre technique plus laborieuse (que j’ai essayé et cela fonctionne) qui est expliqué ici : https://victorfont.com/remove-divi-shortcodes-changing-themes/
Super ! Merci Stéphane pour le partage de cette info ! Effectivement, le plugin présenté ici est intéressant si on veut conserver les shortcodes au cas où… mais ils restent en BDD. Ton plugin parait efficace. Merci !
Génial !!!
Merci Délycieuse Lycia !
C’est rare de trouver des pages en français pour des astuces Divi.
Et encore plus rare de trouver des infos aussi utiles que celles que tu fournis ici.
J’ai juste une question (bête) de débutant : dans quelle table de la BDD se trouvent les shortcodes générés par Divi ???
J’ai besoin de tripatouiller ces shortcodes afin de générer des pages/sections/modules de façon dynamique, selon l’identité du user.
Merci encore.
Lamine
Hello Lamine !
Merci à toi 😉
Vu ta question, je suppose que tu n’es pas si débutant que ça 😉
Je vais avoir du mal à te répondre pour la simple et bonne raison que je ne me suis jamais posée la question (et que mes connaissances en termes de BDD sont plutôt primaire).
Si tu trouves une réponse satisfaisante, n’hésites pas à la poster ici ultérieurement, ça pourrait aider d’autres utilisateurs !
A bientôt
Lycia
Merci Lycia !
Je te jure, je suis vraiment débutant, grand débutant même !
J’essaie de faire un site web basé sur les thèmes et layouts DIVI.
Mais j’ai besoin de savoir où sont stockées les infos des pages que je génère, et notamment les shortcodes.
Pour l’instant je n’ai pas encore où ils sont mis dans mes bases MySQL. Mais (grâce à toi encore), en lisant simplement le layout généré par DIVI (https://astucesdivi.com/wp-content/uploads/2018/10/version-apres-suppression-divi.jpg), j’ai compris que les shortcodes sont traités comme de simples balises html dans le code.
J’arrive alors à modifier « en dur » les pages que je souhaite en y insérant, au bon endroit et en faisant attention à la syntaxe, les balises (shortcodes) que je veux.
Je sais, c’est une méthode un peu trop militaire, mais que veux-tu ? Quand on n’a pas de grives on mange des merles !
Thx & Bye
MDR ! Oui, des merles !
Ok, ben tant mieux si ça a pu t’aider… Toutefois, je pense aussi que ces fameux shortcodes sont stockés en BDD… Mais où ? C’est une grande question 😉
Les shortcodes ne sont pas réellement stockés dans la BDD comme ID avec un contenu.
En fait, ils sont utilisé dans la colonne « post_content » de la table « wp_posts » qui contient toutes les révisions des pages/articles, etc…
Il suffit de faire une recherche « [et_pb_content » dans la base de WordPress pour voir où ils sont stockés.
Par contre je ne vois pas comment fait le plugin pour les garder (dans l’hypothèse qu’il les supprime de la BDD).
Merci David pour ces précisions
intéressant à savoir, merci !
Bonjour,
J’ai une question générale : chaque builder utilise-t-il des shortcodes qui lui sont propres, ou bien existe-t-il une sorte de norme ou de protocole pour la syntaxe des shortcodes qui permettrait éventuellement d’utilise les mêmes d’un builder à l’autre ?
D’avance merci.
Non Michel, il n’y a pas de normes malheureusement