Webflow sync, pageviews & more.
NEW

Can PHP code be added directly in the embed component in Webflow to make a form fully functional in a Webflow hosted environment, or is it still necessary to export and add PHP code?

TL;DR
  • Webflow does not support PHP execution, as it only allows HTML, CSS, and JavaScript on its hosting.
  • Alternatives: Use Webflow’s built-in form handling, integrate third-party services (Zapier, Make, Webhooks), or export the site and host it externally with PHP.

No, PHP code cannot be executed directly within Webflow’s Embed component because Webflow does not support server-side scripting languages like PHP on its hosting environment. Webflow only supports HTML, CSS, and JavaScript for front-end development.

1. Why PHP Won't Work in Webflow's Hosting

  • Webflow does not support server-side languages like PHP, which requires a server environment (such as Apache or Nginx).
  • The Embed component only allows front-end code (HTML, CSS, JavaScript), meaning PHP scripts would not be processed.
  • Webflow forms use Webflow's built-in form handling, which stores submissions inside Webflow or sends them via email, but does not support external PHP processing.

2. Alternatives to Using PHP in Webflow

If you need PHP for form processing, you have two main options:

  • Option 1: Use Webflow’s Built-in Form Submissions

  • Webflow provides basic form functionality without PHP.

  • Submissions are stored in Webflow’s dashboard and can be forwarded via email.

  • Option 2: Integrate an External Backend (No Code / Low Code)

  • Use tools like Zapier, Make (Integromat), or Webhooks to send form data to a backend service for processing.

  • Connect Webflow forms to a platform like Airtable, Google Sheets, or a third-party form processor (e.g., Formspree).

  • Option 3: Export Webflow and Add PHP Code

  • If you must use PHP, you need to export your Webflow site and host it on a server that supports PHP (e.g., a traditional hosting provider or VPS).

  • Once exported, manually insert PHP code within the form processing logic.

Summary

Webflow does not support PHP execution on its servers, so PHP forms won’t work in the Embed component. You must either use Webflow’s built-in form handling, connect to third-party services, or export the site and host it externally with PHP.

Rate this answer

Other Webflow Questions