Skip to main content
  1. All Posts/

divi-migration-tools

Tools Open Source PHP WordPress

Divi Migration Tools

Different criteria to migrate the Divi shortcodes.

  • Migrate the following Divi shortcodes to Gutenberg blocks 🙌

    • [et_pb_video]

      • It will pick the youtube url and create a youtube block then it will replace the shortcode with Gutenberg block inside the post-content.
    •   <li>
          [et_pb_button]</p> <ul dir="auto">
            <li>
              It will pick the {href, text color, background color} and create a button block then it will replace the shortcode with Gutenberg block inside the post-content.
            </li>
          </ul>
        </li>
        
        <li>
          [et_pb_image]</p> <ul dir="auto">
            <li>
              It will pick the {src, align attribute, height, width} and create a image block then it will replace the shortcode with Gutenberg block inside the post-content.
            </li>
          </ul>
        </li>
        
        <li>
          [et_pb_fullwidth_image]</p> <ul dir="auto">
            <li>
              It will pick the {src, align attribute, height, width} and create a image block then it will replace the shortcode with Gutenberg block inside the post-content.
            </li>
          </ul>
        </li>
        
        <li>
          [et_pb_post_title]</p> <ul dir="auto">
            <li>
              It will create a group block and nest the heading,image,paragraph blocks inside it then it will replace the shortcode with Gutenberg block inside the post-content.
            </li>
            <li>
              This will be dependent on a post where shortcode is added. So it will behave like the_post() behaviour for single page.
            </li>
            <li>
              This will pull the styles too. i.e. background-color, font-style, font-size, line-height etc.
            </li>
          </ul>
        </li>
        
        <li>
          [et_pb_divider]</p> <ul dir="auto">
            <li>
              It will pick the {color} and create a shape divider block then it will replace the shortcode with Gutenberg block inside the post-content.
            </li>
          </ul>
        </li>
        
        <li>
          [et_pb_blurb]</p> <ul dir="auto">
            <li>
              It will pick the {image src, align attributes, paragraph test} and create a image block + heading block then it will replace the shortcode with Gutenberg block inside the post-content.
            </li>
          </ul>
        </li>
      </ul>
      
    • Skip the following Divi shortcodes to Gutenberg blocks ⚠️

      • , , [toc], [Sarcastic], , [Tweet], [Proof]

        • These shortcode doesn’t have any dependency on Divi.
      •   <li>
            [et_social_follow]</p> <ul dir="auto">
              <li>
                This shortcode is coming though a plugin called <code>Monarch</code> and it will work independently without Divi
              </li>
            </ul>
          </li>
          
          <li>
            [et_pb_tabs], [et_pb_tab], [et_pb_testimonial], [et_pb_contact_form] , [et_pb_contact_field], [et_pb_video_slider], [et_pb_video_slider_item], [et_pb_social_media_follow], [et_pb_social_media_follow_network], [et_pb_blog], [et_pb_pricing_tables], [et_pb_team_member], [et_pb_pricing_tables]</p> <ul dir="auto">
              <li>
                These shortcodes needs to be fixed manually by adding needful content markup.
              </li>
            </ul>
          </li>
        </ul>
        
      • Divi shortcodes that can be cleared from the post-content 🧐 [Most crucial and important for manual review post script work]

        • [et_pb_section], [et_pb_row], [et_pb_column], [et_pb_text], [et_pb_fullwidth_header], [et_pb_code], [et_pb_cta], [et_pb_row_inner], [et_pb_column_inner], [et_pb_sidebar], [et_pb_slider], [et_pb_slide], [et_pb_line_break_holder], [et_pb_toggle], [et_pb_fullwidth_code]
          • These shortcodes can be cleared from markup but again manual verification is required.

      Migration Commands:

      • wp divi-cli migrate-shortcodes

        • This command will start migration posts for posts in dry-run mode.
        • It will keep the copy of old Divi post-content in post-meta.
        • Flags:
          • –post-type => Value can be post or page or cpt.
          • –status => Value can be publish or draft.
          • –dry-run => Value can be true or false.
      • wp divi-cli reset-divi-content

        • This command will revert the migration and will replace the original Divi content.
        • It is possible because before migration, Divi content is being stored in postmeta as copy of old Divi content.
        • Flags:
          • –post-type => Value can be post or page or cpt.
          • –status => Value can be publish or draft.
          • –dry-run => Value can be true or false.

      Migration logs