---
title: "Embed to WordPress websites"
url: "https://help.magicblocks.ai/en/article/embed-your-ai-agent-on-your-wordpress-website"
language: "en"
last_updated: "2026-03-18T08:20:13.755Z"
---

# Embed to WordPress websites

Ready to bring your AI Agent to your WordPress site? With the WPCode plugin, you can embed your Agent in just a few clicks, no coding or theme editing required.

## **What You’ll Need Before You Start**

Before we jump in, make sure you have everything ready:

-   A **published** AI Agent built in MagicBlocks
-   Your **MagicBlocks Embed Code** (here’s the step-by-step on how to get the code ([Embedding](https://help.magicblocks.ai/en/article/embedding-your-ai-agent-to-a-website)).
-   Admin access to your **WordPress site**

## **Step-by-Step: How to Embed Your AI Agent on WordPress**

### **1\. Copy the Embed Code from MagicBlocks**

Start in your MagicBlocks dashboard:

-   Go to **Agents**
-   Select the Agent you want to go live with
-   Navigate to the **Go Live**
-   **Copy** the code to Embed.![1](https://export.supademo.com/renders/2bwiyztwup/out.png)

This is the script you’ll paste into WordPress to activate the Agent on your site.

This video will explain the step-by-step process on how to embed your AI Agent on Wordpress:

### **2\. Log in to WordPress**

From your WordPress admin dashboard:

1.  Click on **“Plugins”** in the sidebar
2.  Then click **“Add New Plugin”**![2](https://export.supademo.com/renders/277u590but/out.png)

### **3\. Search for “WPCode” Plugin**

In the search bar, type **“WPCode”**.

Look for the plugin named:    
**“WPCode – Insert Headers and Footers + Custom Code Snippets”**![3](https://export.supademo.com/renders/9jx2m80alf/out.png)

### **4\. Install & Activate**

Once you’ve located WPCode, click **Install Now** to begin installation. After installation, the button will change to **“Activate”** click it to enable the plugin.![4](https://export.supademo.com/renders/6uy99p2i3q/out.png)![5](https://export.supademo.com/renders/6p7h0gqrof/out.png)

### **6\. Go to WPCode > Code Snippets > Header & Footer**

In your WordPress dashboard sidebar:

-   Click **“Code Snippets”** (under the new WPCode menu)
-   Then select **“Header & Footer”**
-   This opens a simple editor to paste custom code into your site’s footer.![6](https://export.supademo.com/renders/ec6nk6utyi/out.png)

### **7\. Paste the MagicBlocks Embed Code in the Header Section**

In the **Header** section of the code editor:

![7](https://export.supademo.com/renders/d9q3c51pzx/out.png)Paste the **embed code** you copied from MagicBlocks

### **8\. Click “Save Changes”**

Scroll down and hit **Save Changes** to apply the code site-wide.

> Your Agent is now active across your WordPress website.

### ![8](https://export.supademo.com/renders/7rjrlr58e3/out.png)   
**Your AI Agent Is Live! 🎉**

Visit your website and you’ll see the MagicBlocks chat icon in the bottom right of your website.

### ![9](https://export.supademo.com/renders/6yp6b2vlpd/out.png)   
**Start Chatting & Testing**

Click on the chat icon and test your contact capture flow. Make sure your Agent responds correctly and matches your tone, brand, and objectives.

![10](https://export.supademo.com/renders/73iwnvcn4n/out.png)
