All Collections
Divi Developers
How To Create A Divi Extension
How To Create A Divi Extension

Learn how to develop extensions for Divi

Mitch avatar
Written by Mitch
Updated over a week ago

Note: This tutorial series is intended for advanced users. Advanced understanding of coding in PHP and JavaScript is required.

What's A Divi Extension?

A Divi Extension is a WordPress plugin that customizes Divi. For example, an extension can add custom modules to the Divi Builder or add new options to the theme — the possibilities are almost endless!

All Divi Extensions consist of some PHP code. Depending on their purpose, they can also consist of some JavaScript, HTML, and CSS. In this tutorial, you'll learn how to start a new Divi Extension.

Development Environment

Before creating a Divi Extension, you must ensure you have the proper environment set on your local system. The requirements are:

  • A fully functional installation of WordPress.

  • The latest LTS version of NodeJS.

  • The latest version of Yarn (optional but preferred).

  • The latest version of Divi.

There's a guide if you don't have a development environment setup.

Create Divi Extension

Create Divi Extension is a command line utility that streamlines the process of creating and maintaining Divi Extensions.

  1. Open a terminal and change to your WordPress plugins directory. If you followed our tutorial to set up your development environment, you should already have a command prompt inside your docker container. If so, you can change to the plugins directory using the following command:

    cd wp-content/plugins

  2. Now, run this command to create your extension:

    npx create-divi-extension my-extension

  3. You'll be prompted to provide some details about your extension, and then you'll be able to find it inside your WordPress plugins directory!

Inside your new extension's directory, you'll find an initial project structure that provides a minimal, fully functional Divi Extension waiting for you to make it your own.

What’s Next?

Now that you’ve created your Divi Extension, you’ll probably want to learn How To Create A Divi Builder Module.

Did this answer your question?