All examples
Tutorial5 min read

Deploy WordPress with OpenClaw Chat Widget

Add OpenClaw's chat widget to a WordPress site. Serve the widget from Fly.io and embed it in minutes.

Add OpenClaw's chat widget to any WordPress site. Let visitors chat with your AI assistant directly from your WordPress site.

The Embed Code

Add to your WordPress theme's header.php or use a plugin like WPCode:

<script src="https://your-openclaw-app.fly.dev/widget.js" defer></script>
<style>
  .openclaw-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  }
</style>
<button class="openclaw-chat-button" onclick="OpenClaw.open()">
  <svg viewBox="0 0 24 24" width="24" height="24" style="margin:18px">
    <path fill="white" d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/>
  </svg>
</button>

WordPress Plugin

For easier management, use a custom WordPress plugin:

  1. Create directory: /wp-content/plugins/openclaw-widget/
  2. Add openclaw-widget.php with the plugin header and embed code
  3. Activate in WordPress admin

Customization

Style the chat widget to match your brand. OpenClaw's widget is fully customizable via CSS overrides.

Skip the self-hosting

Deploy OpenClaw in under a minute

No servers. No SSH. No terminal. Pick a model, connect Telegram, and go.

Deploy free with Testflight