Divi PHP Code Module

A Divi Builder module that lets you add and run PHP code directly inside Divi pages, with preview and debugging in the Visual Builder and styling through Divi’s design settings.

Version2.0.2
Last UpdatedNovember 4, 2026
TypeWordPress Plugin
LicenseGPL v2 or later
Live DemoView demo →

Or join VIP and download this plus every other theme & plugin for free.

Already a member? Log in

100% GPL · Original files · Unlimited sites

  • Original, unmodified files — delivered exactly as distributed by the developer
  • GPL licensed — use it on unlimited websites, personal or client
  • Free updates — new versions appear here as soon as they are released
  • Verified downloads — every file is integrity-checked (SHA-256) before release

Distributed under the GNU General Public License. Not affiliated with the original developer; official support, license keys and developer-hosted services (such as one-click updates) are available only from the developer.

Secure checkout with PayPal · GPL licensed · Instant download

Description

Divi PHP Code Module is a WordPress plugin that adds a dedicated PHP Code module to the Divi Builder. You place it in a layout, enter PHP code in the module settings, and the code runs when the page is viewed, showing its output where the module sits. It works with Divi 4 and Divi 5.

Key Features

  • Run PHP in Divi – You can execute PHP inside Divi pages and posts without building a child theme or wrapping code in shortcodes.
  • Visual Builder preview – A play button in the Visual Builder runs your code so you can see how the output will look before publishing.
  • Debug and error handling – A debug option lets you toggle error display on or off, and error handling is built in to keep the site functional if code fails.
  • Style with Divi settings – The generated output can be styled using Divi's design settings so it matches the rest of the layout.
  • Administrator-only access – By default only administrators can use the PHP code module, which limits who can run code on the site.
  • Role Editor integration – The module integrates with Divi Role Editor and uses cryptographic integrity checking to help control who runs code.
  • Divi 4 and 5 support – The module works with both Divi 4 and Divi 5.

Who Is It For

This plugin is aimed at Divi users and developers who want to place PHP output at a specific spot in a layout, such as pulling data from WordPress, a database, custom fields or an API, without creating a child theme or shortcode workaround.