WordPress powers over 43% of websites worldwide. If you have a WordPress site and want to add an AI chatbot, you're in the right place.

In this detailed guide, we show you exactly how to install an AllAI chatbot on WordPress — either through our dedicated plugin or via the manual code method. We'll also cover integration with WooCommerce, compatibility with popular page builders, and solutions for the most common issues.

Before You Start: What You Need

Make sure you have the following ready:

  • An AllAI account — if you don't have one yet, create one for free
  • A configured chatbot — with the knowledge base loaded and customization done
  • Access to the WordPress admin panel — with administrator rights
  • AllAI API key — find it in the AllAI dashboard, Settings → Integrations section
💡 Pro Tip

If you haven't created a chatbot yet, check our guide How to Create an AI Chatbot in 5 Minutes first. Come back here when the chatbot is ready.

Method 1: Plugin Installation (Recommended)

This is the simplest and recommended method. The AllAI WordPress plugin handles everything: installation, updates, and advanced configuration, directly from the WordPress panel.

Step 1: Install the Plugin

  1. Log in to the WordPress admin panel (your-site.com/wp-admin)
  2. Navigate to Plugins → Add New Plugin
  3. In the search bar, type "AllAI Chatbot"
  4. Find the official AllAI plugin and click "Install Now"
  5. After installation, click "Activate"

The entire process takes under 30 seconds. The plugin now appears in the WordPress sidebar menu.

Step 2: Connect Your AllAI Account

  1. In the WordPress sidebar menu, click on AllAI Chatbot
  2. Enter the API Key you copied from the AllAI dashboard
  3. Click "Connect"
  4. If you have multiple chatbots, select the desired one from the dropdown list

The plugin will confirm the connection with a green success message. Your chatbot is now active on the site.

Step 3: Advanced Configuration (optional)

From the plugin settings, you can control the chatbot's behavior directly from WordPress:

  • Display on specific pages — choose which pages the chatbot appears on (all, only certain pages, or exclude specific pages)
  • Display on content types — enable or disable on posts, pages, WooCommerce products, categories
  • Custom triggers — set the chatbot to open automatically after X seconds, on scroll, or on exit intent
  • Display rules — show the chatbot only for new visitors, only on desktop, or only on mobile
  • Exclude logged-in users — hide the chatbot for administrators or editors
💡 Pro Tip

Exclude the WooCommerce Checkout page if the chatbot isn't configured for checkout assistance. An unexpected pop-up at the moment of payment can distract the customer from completing their purchase.

Method 2: Manual Installation with Code

If you prefer not to install an additional plugin or have specific restrictions, you can add the chatbot manually via code. This method works on any WordPress theme.

Option A: Via "Insert Headers and Footers" Plugin

If you already use a code insertion plugin (such as WPCode or Insert Headers and Footers), this is the simplest option:

  1. Navigate to Plugins → WPCode (or your code insertion plugin)
  2. Create a new code snippet
  3. Select the type "HTML"
  4. Paste the AllAI widget code:
<!-- AllAI Chatbot Widget -->
<script src="https://widget.allai.ro/loader.js"
        data-bot-id="YOUR-UNIQUE-ID"
        async>
</script>
  1. Set the location to "Footer"
  2. Activate the snippet and save

Option B: Directly in functions.php

If you're comfortable editing theme code, you can add the widget directly in functions.php:

// AllAI Chatbot Widget
function allai_chatbot_widget() {
    echo '<script src="https://widget.allai.ro/loader.js"
          data-bot-id="YOUR-UNIQUE-ID"
          async></script>';
}
add_action('wp_footer', 'allai_chatbot_widget');
⚠️ Important

If you edit functions.php directly, use a child theme. Otherwise, your changes will be erased with every theme update. The plugin method is always safer.

Option C: Through the WordPress Theme Editor

  1. Navigate to Appearance → Theme Editor
  2. Select the footer.php file from the list on the right
  3. Find the </body> tag
  4. Paste the AllAI widget code just before </body>
  5. Click "Update File"

WooCommerce Integration

If you have a WooCommerce store, the AllAI chatbot becomes an extremely powerful tool. Here's how to optimize the integration:

Product Assistance

Train the chatbot with your WooCommerce product catalog. AllAI can automatically scan product pages and learn:

  • Product names and descriptions
  • Prices (including promotional prices)
  • Stock availability
  • Product categories and attributes

Order Support

Configure the chatbot to answer frequent order questions:

  • "Where is my order?" — provides a link to the tracking page
  • "What's your return policy?" — explains the necessary steps
  • "How much is shipping?" — provides information about shipping methods and costs
  • "Can I change the delivery address?" — guides the customer through the correct process

Product Recommendations

The chatbot can recommend products based on the conversation. For example, a customer who asks "I'm looking for a moisturizer for dry skin" can receive personalized recommendations from your catalog.

An online natural cosmetics store reported a 34% increase in average cart value after implementing product recommendations through the chatbot.

Compatibility with Page Builders

If you use a popular page builder, the AllAI chatbot works perfectly with all of them:

Elementor

The chatbot works automatically with Elementor without additional configuration if you use the plugin method. For the manual method, add an "HTML" element in the global Elementor footer and paste the widget code.

Divi (Elegant Themes)

For Divi, you can use the "Code" module in a Global Footer or the functions.php method described above. If you use Divi Theme Builder, add a Code module in the Footer template.

WPBakery / Visual Composer

Add a "Raw HTML" element in the template footer and paste the widget code. Alternatively, use the plugin method for automatic installation.

Beaver Builder

The AllAI plugin works independently of Beaver Builder. For the manual method, use an HTML module in saved rows or in the footer template.

💡 Pro Tip

Regardless of the page builder you use, the AllAI plugin method is always the simplest. The plugin automatically adds the code to the site footer without interacting with your page builder.

Advanced Configuration: Triggers and Rules

The AllAI WordPress plugin offers advanced customization options that aren't available through the manual method:

Display Triggers

  • Time Delay — the chatbot opens automatically after X seconds (recommended: 15-30 seconds)
  • Scroll Depth — activates when the visitor scrolls a certain percentage of the page
  • Exit Intent — detects the intent to leave the site and opens the chatbot with a personalized message
  • Click Trigger — the chatbot opens on click of a specific button or link

Conditional Rules

  • New vs. returning visitor — different welcome messages
  • Device — different behavior on desktop versus mobile
  • Traffic source — personalized message for visitors coming from Google, Facebook, or other sources
  • Page URL — different behavior on the product page versus the contact page

Troubleshooting: Most Common Issues

Sometimes things don't work on the first try. Here are solutions for the most common issues encountered when installing on WordPress:

Chatbot doesn't appear on the site

  • Cache: Clear the WordPress cache (WP Super Cache, W3 Total Cache, LiteSpeed Cache) and the browser cache
  • Security plugin: Check if a security plugin (Wordfence, Sucuri) is blocking the AllAI script. Add widget.allai.ro to the whitelist
  • CDN/Cloudflare: If you use Cloudflare, clear the Cloudflare cache or temporarily disable Rocket Loader
  • API Key: Verify the API key is correct and the chatbot is active in the AllAI dashboard

Chatbot loads slowly

  • Make sure the async attribute is present in the script tag
  • Check if an optimization plugin (Autoptimize, WP Rocket) isn't combining or deferring the AllAI script — add it to exceptions
  • Test site speed with Google PageSpeed Insights — the AllAI widget is optimized not to affect the score

Conflicts with other plugins

  • If you have another chat plugin (Tidio, Tawk.to, Crisp), deactivate it before activating AllAI
  • JavaScript minification plugins can cause issues — add AllAI to exceptions
  • Test with all plugins deactivated to identify specific conflicts
⚠️ Important

Don't install the chatbot through two methods simultaneously (plugin + manual code). This will cause the widget to load twice and can create performance and display issues.

Widget overlaps content on mobile

  • From AllAI settings, adjust the widget's bottom margin
  • If you have a fixed menu at the bottom of the site on mobile, increase the margin to 70-80px
  • You can set a different position (left vs. right) for mobile devices

Verify Installation: Checklist

After installation, go through this list to make sure everything works correctly:

  1. Widget appears on desktop (Chrome, Firefox, Safari, Edge)
  2. Widget appears on mobile (iOS and Android)
  3. Chatbot opens when clicking the chat button
  4. Welcome message is correct
  5. Chatbot responds correctly to 3-5 test questions
  6. Quick suggestion buttons work
  7. Conversations appear in the AllAI dashboard
  8. No errors in the browser console (F12 → Console)
  9. Site speed is not significantly affected (test with GTmetrix or PageSpeed)
  10. Widget doesn't overlap important site elements

Next Steps

Congratulations! Your AllAI chatbot is now active on your WordPress site. Here's what you can do next to maximize results:

  • Monitor conversations — check the AllAI dashboard daily to see what visitors are asking
  • Refine responses — add new information based on real conversations
  • Connect with CRM — integrate with HubSpot, Salesforce, or Pipedrive to automatically capture leads
  • Activate WhatsApp — extend the chatbot to WhatsApp Business to be present on your customers' preferred channel

For more integrations and advanced configurations, check the dedicated WordPress integration page or our pricing plans.

Need help? Schedule a free demonstration with our team, and a specialist will guide you through the entire configuration process.