{"id":148,"date":"2024-01-16T00:00:00","date_gmt":"2024-01-15T23:00:00","guid":{"rendered":"https:\/\/helloblog.io\/fr\/acorn-prettify-successeur-soil-wordpress-roots-acorn\/"},"modified":"2026-01-20T06:32:41","modified_gmt":"2026-01-20T05:32:41","slug":"acorn-prettify-successeur-soil-wordpress-roots-acorn","status":"publish","type":"post","link":"https:\/\/helloblog.io\/fr\/acorn-prettify-successeur-soil-wordpress-roots-acorn\/","title":{"rendered":"Acorn Prettify : le successeur moderne de Soil pour assainir WordPress (version Roots\/Acorn)"},"content":{"rendered":"\n<p>Roots vient de publier <strong>Acorn Prettify<\/strong>, un nouveau package Composer pens\u00e9 comme le <strong>successeur direct de Soil<\/strong>. Si tu as d\u00e9j\u00e0 travaill\u00e9 avec Roots\/Sage, tu vois probablement Soil comme ce plugin \u201chygi\u00e8ne\u201d qui corrige plein de d\u00e9tails WordPress p\u00e9nibles (markup inutile, recherche parfois surprenante, URLs relatives\u2026). L\u2019id\u00e9e ici est simple : garder les fonctionnalit\u00e9s que l\u2019\u00e9quipe Roots souhaite continuer \u00e0 maintenir, et les int\u00e9grer proprement dans le monde <strong>Acorn<\/strong> (le runtime\/app container de Roots, inspir\u00e9 de Laravel).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pourquoi Soil \u00e9volue vers Acorn Prettify ?<\/h2>\n\n\n\n<p>Petit rappel historique : Soil \u00e9tait initialement int\u00e9gr\u00e9 au starter theme Roots (autour de 2011\u20132014), puis a \u00e9t\u00e9 s\u00e9par\u00e9 en plugin standalone \u00e0 partir de Roots v7. Aujourd\u2019hui, Roots annonce clairement miser sur <strong>Acorn<\/strong> et sur son <strong>\u00e9cosyst\u00e8me de packages<\/strong>. Acorn Prettify s\u2019inscrit dans cette logique : un package d\u00e9di\u00e9, maintenable, align\u00e9 sur l\u2019outillage Acorn et sa configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ce qu\u2019Acorn Prettify apporte (les \u201cessentiels\u201d de Soil)<\/h2>\n\n\n\n<p>Acorn Prettify reprend les fonctionnalit\u00e9s principales que Roots veut continuer \u00e0 faire \u00e9voluer. Concr\u00e8tement, tu y retrouves :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><strong>Nettoyage du markup WordPress<\/strong> : l\u2019objectif est d\u2019obtenir un HTML plus propre c\u00f4t\u00e9 rendu (moins de bruit, plus de coh\u00e9rence).<\/li>\n\n\n<li><strong>Une recherche \u201cplus agr\u00e9able\u201d<\/strong> (<em>Nice search<\/em>) : am\u00e9lioration du comportement de recherche pour des r\u00e9sultats plus pertinents\/moins surprenants selon les cas d\u2019usage WordPress.<\/li>\n\n\n<li><strong>Relative URLs<\/strong> : prise en charge des URLs relatives, mais <strong>d\u00e9sactiv\u00e9e par d\u00e9faut<\/strong> (ce point est important si tu t\u2019appuyais dessus auparavant).<\/li>\n\n<\/ul>\n\n\n\n<div class=\"wp-block-group callout callout-info is-style-info is-layout-flow wp-block-group-is-layout-flow\" style=\"border-width:1px;border-radius:8px;padding-top:1rem;padding-right:1.5rem;padding-bottom:1rem;padding-left:1.5rem\">\n\n<h4 class=\"wp-block-heading callout-title\">\u00c0 retenir<\/h4>\n\n\n<p>Si tu utilises les URLs relatives via Soil, v\u00e9rifie bien ton comportement apr\u00e8s migration : dans Acorn Prettify, cette fonctionnalit\u00e9 est annonc\u00e9e comme <strong>off par d\u00e9faut<\/strong>.<\/p>\n\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Migration : passer de Soil \u00e0 Acorn Prettify (Composer)<\/h2>\n\n\n\n<p>La migration se fait de fa\u00e7on tr\u00e8s directe via Composer : tu retires Soil, puis tu ajoutes Acorn Prettify.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>composer remove roots\/soil\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> remove<\/span><span style=\"color:#9ECBFF\"> roots\/soil<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>composer require roots\/acorn-prettify\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">composer<\/span><span style=\"color:#9ECBFF\"> require<\/span><span style=\"color:#9ECBFF\"> roots\/acorn-prettify<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>C\u00f4t\u00e9 projets <strong>Sage<\/strong>, Roots indique aussi que tu peux supprimer les options <code>add_theme_support<\/code> li\u00e9es \u00e0 Soil dans ton <code>app\/setup.php<\/code> (puisque tu ne pilotes plus Soil de cette mani\u00e8re). Un exemple concret est visible dans le diff partag\u00e9 par l\u2019\u00e9quipe Sage.<\/p>\n\n\n\n<p>Lien utile : <a href=\"https:\/\/github.com\/roots\/sage\/pull\/3172\/files\">exemple de suppression dans le repo Sage<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuration : activer\/ajuster les features via config\/prettify.php<\/h2>\n\n\n\n<p>L\u2019activation des fonctionnalit\u00e9s d\u2019Acorn Prettify se fait via un fichier de configuration : <code>config\/prettify.php<\/code>. En pratique, \u00e7a veut dire que les features sont pilot\u00e9es comme dans beaucoup de projets \u201c\u00e0 la Laravel\u201d : un fichier de config unique, lisible, versionnable.<\/p>\n\n\n\n<p>Si tu veux modifier les valeurs par d\u00e9faut, Roots recommande de <strong>publier<\/strong> le fichier de configuration dans ton projet, puis de l\u2019\u00e9diter.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#24292e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#e1e4e8;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>wp acorn vendor:publish --tag=prettify-config\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#B392F0\">wp<\/span><span style=\"color:#9ECBFF\"> acorn<\/span><span style=\"color:#9ECBFF\"> vendor:publish<\/span><span style=\"color:#79B8FF\"> --tag=prettify-config<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>R\u00e9f\u00e9rence : le fichier de config par d\u00e9faut est disponible ici : <a href=\"https:\/\/github.com\/roots\/acorn-prettify\/blob\/main\/config\/prettify.php\"><code>config\/prettify.php<\/code><\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Ce que \u00e7a change au quotidien sur un projet Roots\/Sage<\/h2>\n\n\n\n<p>Le b\u00e9n\u00e9fice principal, c\u2019est la <strong>consolidation<\/strong> autour d\u2019Acorn : m\u00eame logique de packages, m\u00eame approche de configuration, m\u00eame \u201csurface\u201d d\u2019outillage (WP-CLI via <code>wp acorn<\/code>, publication de config, etc.). Pour une base Sage moderne, \u00e7a \u00e9vite d\u2019avoir un plugin historique \u00e0 part, avec ses conventions, alors que le reste du projet vit d\u00e9j\u00e0 dans l\u2019univers Acorn.<\/p>\n\n\n\n<p>Enfin, le fait que certaines fonctionnalit\u00e9s (comme les <strong>Relative URLs<\/strong>) soient d\u00e9sormais <strong>d\u00e9sactiv\u00e9es par d\u00e9faut<\/strong> envoie un signal : Roots privil\u00e9gie des defaults plus prudents et attend que tu actives explicitement ce dont tu as besoin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">R\u00e9sum\u00e9<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>Acorn Prettify<\/strong> remplace Soil pour les fonctionnalit\u00e9s \u201chygi\u00e8ne\u201d que Roots maintient activement.<\/li>\n\n\n<li>La migration est essentiellement un swap Composer : <code>roots\/soil<\/code> \u2192 <code>roots\/acorn-prettify<\/code>.<\/li>\n\n\n<li>Sur Sage, tu peux retirer les <code>add_theme_support<\/code> d\u00e9di\u00e9s \u00e0 Soil dans <code>app\/setup.php<\/code>.<\/li>\n\n\n<li>La configuration passe par <code>config\/prettify.php<\/code>, publiable via <code>wp acorn vendor:publish --tag=prettify-config<\/code>.<\/li>\n\n\n<li>Les <strong>Relative URLs<\/strong> sont pr\u00e9sentes, mais <strong>off par d\u00e9faut<\/strong> : \u00e0 valider apr\u00e8s migration.<\/li>\n\n<\/ol>\n\n\n<div class=\"references-section\">\n                <h2>R\u00e9f\u00e9rences \/ Sources<\/h2>\n                <ul class=\"references-list\"><li><a href=\"https:\/\/roots.io\/announcing-acorn-prettify\/\" target=\"_blank\" rel=\"noopener noreferrer\">Announcing Acorn Prettify<\/a><\/li><li><a href=\"https:\/\/github.com\/roots\/acorn-prettify\" target=\"_blank\" rel=\"noopener noreferrer\">roots\/acorn-prettify<\/a><\/li><li><a href=\"https:\/\/github.com\/roots\/soil\" target=\"_blank\" rel=\"noopener noreferrer\">Soil<\/a><\/li><li><a href=\"https:\/\/roots.io\/creating-an-acorn-package\/\" target=\"_blank\" rel=\"noopener noreferrer\">Creating an Acorn package<\/a><\/li><li><a href=\"https:\/\/github.com\/roots\/sage\/pull\/3172\/files\" target=\"_blank\" rel=\"noopener noreferrer\">Example from the Sage repo (PR diff)<\/a><\/li><li><a href=\"https:\/\/github.com\/roots\/acorn-prettify\/blob\/main\/config\/prettify.php\" target=\"_blank\" rel=\"noopener noreferrer\">Acorn Prettify config file (config\/prettify.php)<\/a><\/li><\/ul>\n            <\/div>","protected":false},"excerpt":{"rendered":"<p>Soil faisait partie des \u201cpetites am\u00e9liorations indispensables\u201d dans beaucoup de projets Roots\/Sage. Acorn Prettify reprend l\u2019essentiel, le place au c\u0153ur de l\u2019\u00e9cosyst\u00e8me Acorn, et te donne une configuration plus propre via un simple fichier de config.<\/p>\n","protected":false},"author":12,"featured_media":147,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63],"tags":[4,8,3,67,10],"class_list":["post-148","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ecosysteme-wordpress","tag-acorn","tag-composer","tag-roots","tag-sage","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts\/148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/comments?post=148"}],"version-history":[{"count":1,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts\/148\/revisions"}],"predecessor-version":[{"id":169,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/posts\/148\/revisions\/169"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/media\/147"}],"wp:attachment":[{"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/media?parent=148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/categories?post=148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloblog.io\/fr\/wp-json\/wp\/v2\/tags?post=148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}